VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: barnett on May 11, 2007, 04:01:16 am

Title: Custom Attributes Extended 2.1 [Hack]
Post by: barnett on May 11, 2007, 04:01:16 am
UPDATE: I no longer support this hack.  It was created for an older version of Virtuemart and for Joomla 1.0.x.  Someone has carried it further in it's development here: http://forum.virtuemart.net/index.php?topic=39666.0

Custom Attribues Extended 2.1 [Hack]
For Virtuemart 1.0.12
Allows you to turn your shopping cart into an in-depth shopping experience.  This hack enables you to allow different types of form elements to be included in each product.

Features of this Hack:
- user defined set, add, or subtract price field.  Great for a donation systems. No brackets needed.
- text box and text area field.
- File upload field.  Great for customers to include artwork or needed documents w/ order.
- Javascript Date Pop-up Calendar.
- Single or Multiple Checkboxes or Radio buttons.
- Drop-down select or Multiple Selectbox.
- Prices can be included in almost all fields using brackets ex. [+3.25]
- Make certain attribute fields required using -r ex: (textarea-r)
- [ ] brakets are stripped off in frontend and replaced with curreny sign
- NEW include image thumbnails with checkboxes,radio buttons, and select box.
- NEW charge extra for text on an per word, per character (w/ or w/out spaces), or all
- NEW charge for a file upload
- NEW add help tips to each field as a hovering tool tip, below title, above field, or below field
- Tested on Joomla 1.0.13 on JSAS w/ VirtueMart 1.0.10

Here is how to implement the Hack: (files included at end)

Backup files first.

Step 1:
download files: ps_product_custom_attribute.php & ps_product_custom_type.php
(found below in .zip file)
Add them to folder: <site_root>/administrator/components/com_virtuemart/classes/

Step 2:
open the file: ps_product_attribute.php
location: <site_root>/administrator/components/com_virtuemart/classes/

find the function around line 354 called: list_custom_attribute()

replace the whole function with the following code:
Code: [Select]
/**
* Creates form fields for customizable products from the custom attribute format
* @author Ted Barnett (ted@contemplatedesign.com)
* @param unknown_type $product_id
* @return string HTML code containing form fields with Labels
*/
function list_custom_attribute($product_id) {
global $mosConfig_secret, $mosConfig_live_site, $mainframe;

require_once(CLASSPATH.'ps_product_custom_attribute.php');
$product_custom_attributes = new ps_product_custom_attribute;

$db = new ps_DB;

$q = "SELECT product_id, custom_attribute from #__{vm}_product WHERE product_id='$product_id'";
$db->query($q);
$db->next_record();

$custom_attr_list=$db->f("custom_attribute");
if ($custom_attr_list) {
$has_custom_attributes=1;
$fields=explode(";",$custom_attr_list);
$html = "";
foreach($fields as $field)
{
$fieldVars = array();
$fieldVars = $product_custom_attributes->customAttributeVars($field);
$html .= $product_custom_attributes->customAttributeHTML($fieldVars['attr_type'], $fieldVars);
}

}

if ($custom_attr_list) {
return $html;
}
}

Step 3:

in the same file find the function around line 391 called getAdvancedAttributes()

replace the whole function with the following code:
Code: [Select]
/**
* This function returns an array with all "advanced" attributes of the product specified by
* $product_id
*
* @param int $product_id
*/
function getAdvancedAttributes( $product_id ) {
global $ps_product;
if( is_null( $ps_product )) {
$ps_product = new ps_product();
}
$attributes_array = array();
$attributes = $ps_product->get_field( $product_id, 'attribute' );

require_once(CLASSPATH.'ps_product_custom_attribute.php');
$product_custom_attributes = new ps_product_custom_attribute;

if($attributes){ $attributes .= ';'; }
$attributes .= $ps_product->get_field( $product_id, 'custom_attribute' );

// Get each of the attributes into an array
$product_attribute_keys = explode( ";", $attributes );
foreach( $product_attribute_keys as $attribute ) {
if(strpos($attribute, "(")){
  
   $fieldVars = array();
$fieldVars = $product_custom_attributes->customAttributeVars($attribute);
$attribute_name = trim($fieldVars['attr_title']);

require_once(CLASSPATH.'ps_product_custom_type.php');
$attr_type_class = 'ps_product_custom_type_'.$fieldVars['attr_type'];
$product_custom_type = new $attr_type_class;
$attribute_values = $product_custom_type->customTypeSecureValue($fieldVars);
} else {
$attribute_name = substr( $attribute, 0, strpos($attribute, ",") );
$attribute_values = substr( $attribute, strpos($attribute, ",")+1 );
}

$attributes_array[$attribute_name]['name'] = trim($attribute_name);
// Read the different attribute values into an array
$attribute_values = explode(',', $attribute_values );
$operand = '';
$my_mod = 0;
foreach( $attribute_values as $value ) {
$operand = '';
$my_mod = 0;
// Get the price modification for this attribute value
$start = strpos($value, "[");
$finish = strpos($value,"]", $start);

$o = substr_count ($value, "[");
$c = substr_count ($value, "]");
// check to see if we have a bracket (means: a price modifier)
       for ($x=0;$x<$c;$x++) {
       if (True != is_int($finish) ) { continue; }
$length = $finish-$start;

// We found a pair of brackets (price modifier?)
if ($length > 1) {
$my_mod=substr($value, $start+1, $length-1);

if ($o != $c) { // skip the tests if we don't have to process the string
if ($o < $c ) {
$char = "]";
$offset = $start;
}
else {
$char = "[";
$offset = $finish;
}
$s = substr_count($my_mod, $char);
for ($r=1;$r<$s;$r++) {
$pos = strrpos($my_mod, $char);
$my_mod = substr($my_mod, $pos+1);
}
}
$operand=substr($my_mod,0,1);

$my_mod=substr($my_mod,1);


}
}
if( $start > 0 ) {
$value = substr($value, 0, $start);
}
$value = trim( $value );

$attributes_array[$attribute_name]['values'][$value]['name'] = $value;
$attributes_array[$attribute_name]['values'][$value]['operand'] = $operand;
$attributes_array[$attribute_name]['values'][$value]['adjustment'] = $my_mod;
$operand = '';
$my_mod = 0;
}

}

return $attributes_array;

}

Step 4:

in the same file find the following function called: cartGetAttributes()

within that function, replace this code on line 503: (which should now be line 528)
Code: [Select]
// added for custom fields by denie van kleef
$custom_attribute_list=$db->f("custom_attribute");
$custom_attribute_given = false;
if ($custom_attribute_list) {
$fields=explode(";",$custom_attribute_list);

$description=$d["description"];
foreach($fields as $field)
{
$pagevar=str_replace(" ","_",$field);
if (!empty($d[$pagevar])) {
$custom_attribute_given = true;
}
if ($description!='') {
$description.="; ";
}
$description.=$field.":";
$description .= empty($d[$pagevar]) ? '' : $d[$pagevar];
}
rtrim($description);
$d["description"] = $description;
// END add for custom fields by denie van kleef

}

with this code:
Code: [Select]
// added for custom fields by ted barnett
global $charge;
$charge = array();
$custom_attributes = array();
$custom_attribute_list=$db->f("custom_attribute");
$description=$d["description"];
$custom_attribute_given = false;
if ($custom_attribute_list) {

require_once(CLASSPATH.'ps_product_custom_attribute.php');
$product_custom_attributes = new ps_product_custom_attribute;

$fields=explode(";",$custom_attribute_list);
foreach($fields as $field) {

$fieldVars = array();
$fieldVars = $product_custom_attributes->customAttributeVars($field);

$pagevar = trim($fieldVars['attr_pagevar']);
if ($fieldVars['attr_type'] == 'line') {
continue;
}
                if ($fieldVars['attr_req'] && empty($d[$pagevar])) {
                       $custom_attribute_given = false;
                       break;                                  
                }
if (!empty($d[$pagevar])) {
$custom_attribute_given = true;
}
if ($description!='') {
$description.="; ";
}
$description.=trim($fieldVars['attr_title']).":";

// strip accidental currency symbols
// add aditional as needed
$d[$pagevar]=str_replace("$","",$d[$pagevar]); // Dollar
$d[$pagevar]=str_replace("£","",$d[$pagevar]); // Pounds
$d[$pagevar]=str_replace("¥","",$d[$pagevar]); // Yen
$d[$pagevar]=str_replace("€","",$d[$pagevar]); // Euro

require_once(CLASSPATH.'ps_product_custom_type.php');
$attr_type_class = 'ps_product_custom_type_'.$fieldVars['attr_type'];
$product_custom_type = new $attr_type_class;
$d[$pagevar] = $product_custom_type->customTypeProcess($d[$pagevar],$fieldVars);
$description .= empty($d[$pagevar]) ? '' : $d[$pagevar];
}
}
rtrim($description);
$d["description"] = $description;
// END add for custom fields by ted barnett

SAVE THE FILE!

Step 5:
open the file: ps_product.php
location: <site_root>/administrator/components/com_virtuemart/classes/

find the function get_adjusted_attribute_price() and go down to about line #1648.

replace the following line of code:
Code: [Select]
// if we've been given a description to deal with, get the adjusted price
if ($description != '') { // description is safe to use at this point cause it's set to ''
require_once(CLASSPATH.'ps_product_attribute.php');
$product_attributes = ps_product_attribute::getAdvancedAttributes($product_id);

$attribute_keys = explode( ";", $description );

for($i=0; $i < sizeof($attribute_keys); $i++ ) {
$temp_desc = $attribute_keys[$i];

$temp_desc = trim( $temp_desc );
// Get the key name (e.g. "Color" )
$this_key = substr( $temp_desc, 0, strpos($temp_desc, ":") );
$this_value = substr( $temp_desc, strpos($temp_desc, ":")+1 );

if( in_array( $this_key, $custom_attribute_fields )) {
if( @$custom_attribute_fields_check[$this_key] == md5( $mosConfig_secret.$this_key )) {
// the passed value is valid, don't use it for calculating prices
continue;
}
}
                
$this_value=str_replace("_"," ",$this_value);
if( isset( $product_attributes[$this_key]['values'][$this_value] )) {
$modifier = $product_attributes[$this_key]['values'][$this_value]['adjustment'];
$operand = $product_attributes[$this_key]['values'][$this_value]['operand'];

// if we have a number, allow the adjustment
if (true == is_numeric($modifier) ) {
                    
// Now add or sub the modifier on
if ($operand=="+") {
$adjustment += $modifier;
}
else if ($operand=="-") {
$adjustment -= $modifier;
}
else if ($operand=='=') {
// NOTE: the +=, so if we have 2 sets they get added
// this could be moded to say, if we have a set_price, then
// calc the diff from the base price and start from there if we encounter
// another set price... just a thought.

$setprice += $modifier;
$set_price = true;
}
}
} else {
continue;
}
}
}

with this:
Code: [Select]
// if we've been given a description to deal with, get the adjusted price
if ($description != '') { // description is safe to use at this point cause it's set to ''
require_once(CLASSPATH.'ps_product_attribute.php');
$product_attributes = ps_product_attribute::getAdvancedAttributes($product_id);

$attribute_keys = explode( ";", $description );

for($i=0; $i < sizeof($attribute_keys); $i++ ) {
$temp_desc = $attribute_keys[$i];

$temp_desc_keys = explode( ",", $temp_desc );
foreach ($temp_desc_keys as $temp_desc){

$temp_desc = trim( $temp_desc );
// Get the key name (e.g. "Color" )
if(strpos($temp_desc, ":")){
$this_key = substr( $temp_desc, 0, strpos($temp_desc, ":") );
$this_value = substr( $temp_desc, strpos($temp_desc, ":")+1 );
} else {
   $this_key = $this_key;
$this_value = $temp_desc;
}

if( in_array( $this_key, $custom_attribute_fields )) {
if( @$custom_attribute_fields_check[$this_key] == md5( $mosConfig_secret.$this_key )) {
// the passed value is valid, don't use it for calculating prices
continue;
}
}

$this_value=str_replace("_"," ",$this_value);
if( !isset( $product_attributes[$this_key]['values'][$this_value] )) {
$this_true_value = $this_value;
$this_value = 'vm_charge';
}
if( isset( $product_attributes[$this_key]['values'][$this_value] )) {
$modifier = $product_attributes[$this_key]['values'][$this_value]['adjustment'];
$operand = $product_attributes[$this_key]['values'][$this_value]['operand'];
if($this_value == 'vm_charge'){
$this_value = this_true_value;
}
// if we have a number, allow the adjustment
if (true == is_numeric($modifier) ) {
                    
// Now add or sub the modifier on
if ($operand=="+") {
$adjustment += $modifier;
}
else if ($operand=="-") {
$adjustment -= $modifier;
}
else if ($operand=='=') {
// NOTE: the +=, so if we have 2 sets they get added
// this could be moded to say, if we have a set_price, then
// calc the diff from the base price and start from there if we encounter
// another set price... just a thought.

$setprice += $modifier;
$set_price = true;
}
}
} else {
continue;
}
}
}
}



Step 6:

in the same file find the following function called: getDescriptionWithTax()

within that function, replace this code on line 1789: (which should now be line 1811)
Code: [Select]

foreach( $attribute_keys as $temp_desc ) {
$finish = strpos($temp_desc,"]");
$temp_desc = trim( $temp_desc );
// Get the key name (e.g. "Color" )
$this_key = substr( $temp_desc, 0, strpos($temp_desc, ":") );
$this_value = substr( $temp_desc, strpos($temp_desc, ":")+1 );

if( in_array( $this_key, $custom_attribute_fields )) {
if( @$custom_attribute_fields_check[$this_key] == md5( $mosConfig_secret.$this_key )) {
// the passed value is valid, don't use it for calculating prices
continue;
}
}
            $this_value = str_replace("_"," ",$this_value);
if( isset( $product_attributes[$this_key]['values'][$this_value] )) {
$modifier = $product_attributes[$this_key]['values'][$this_value]['adjustment'];
$operand = $product_attributes[$this_key]['values'][$this_value]['operand'];

$value_notax = $modifier;
if( abs($value_notax) >0 ) {
$value_taxed = $value_notax * ($my_taxrate+1);
$temp_desc_new  = str_replace( $operand.$modifier, $operand.' '.$CURRENCY_DISPLAY->getFullValue( $value_taxed ), $temp_desc );
                        
$description = str_replace( $this_key.':'.$this_value,
$this_key.':'.$this_value.' ('.$operand.' '.$CURRENCY_DISPLAY->getFullValue( $value_taxed ).')',
$description);

}
$temp_desc = substr($temp_desc, $finish+1);
}

}

with this:
Code: [Select]
foreach( $attribute_keys as $temp_desc ) {
$temp_desc_keys = explode( ",", $temp_desc );
foreach ($temp_desc_keys as $temp_desc){
$finish = strpos($temp_desc,"]");
$temp_desc = trim( $temp_desc );
// Get the key name (e.g. "Color" )
if(strpos($temp_desc, ":")){
$this_key = substr( $temp_desc, 0, strpos($temp_desc, ":") );
$this_value = substr( $temp_desc, strpos($temp_desc, ":")+1 );
} else {
   //$temp_desc .= $this_key.':'.$temp_desc;
   $this_key = $this_key;
$this_value = $temp_desc;
}
if( in_array( $this_key, $custom_attribute_fields )) {
if( @$custom_attribute_fields_check[$this_key] == md5( $mosConfig_secret.$this_key )) {
// the passed value is valid, don't use it for calculating prices
continue;
}
}

           $this_value = str_replace("_"," ",$this_value);
if( !isset( $product_attributes[$this_key]['values'][$this_value] )) {
$this_true_value = $this_value;
$this_value = 'vm_charge';
}
if( isset( $product_attributes[$this_key]['values'][$this_value] )) {
$modifier = $product_attributes[$this_key]['values'][$this_value]['adjustment'];
$operand = $product_attributes[$this_key]['values'][$this_value]['operand'];
  if($this_value == 'vm_charge'){
$this_value = $this_true_value;
}
$value_notax = $modifier;
if( abs($value_notax) >0 ) {
$value_taxed = $value_notax * ($my_taxrate+1);
$temp_desc_new  = str_replace( $operand.$modifier, $operand.' '.$CURRENCY_DISPLAY->getFullValue( $value_taxed ), $temp_desc );
                     
$description = str_replace( $this_value,
$this_value.' ('.$operand.' '.$CURRENCY_DISPLAY->getFullValue( $value_taxed ).')',
$description);

}
$temp_desc = substr($temp_desc, $finish+1);
}
}
}

SAVE THE FILE!


ALL DONE!  Enjoy.  All new and edited files are found in the .zip file below.
The next post will explain the syntax.
-barnett

--UPDATED -- 9-18-07
-- rehashed how to handle added charges to apply tax
-- Updated to Joomla 1.0.13 & VM 1.0.12

-- UPDATED -- 5-17-07
- fixed files in step 1
- fixed lines in step 5
- fixed multiple select box image thumbnail problem
- fixed blank results for non-charge radio, checkbox, select, & multiple items
- added NEW attribute type (number)... see syntax

-- UPDATED -- 5-19-07
- added Max file Size & Min File Size options to file upload... see syntax

-- UPDATED -- 5-23-07
- fixed "File Type Error" for file upload
- fixed File Upload always defaulting to required
- fixed Default Checked Radio & Check boxes for Safari (haven't tested)

-- UPDATED -- 5-23-07
- fixed multiple attributes of same type not being calculated in IE bug

-- UPDATED -- 5-23-07
- fixed file upload to play nice w/ multiple file uploads
- print file name to screen when there is an error

-- UPDATED -- 5-24-07
- fixed IE7 bug: image path was appearing in drop-down select
- added "-d" option to text and textarea charge types to show cost break down in cart... see syntax

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 11, 2007, 04:08:45 am
Syntax:
Name(attribute type)(tip text|tip location)(attribute data);

add "-r" to attribute type to make it required.
if no tip needed you must still add: Name(text)(|)(data);

Attribute Types: price, text, textarea, line, date, file, checkbox, radio, select, multiple, number

Tip Locations: title-hover, title-below, field-above, field-below

Attribute Data:

Price:
Name(price)(tip here|location)(default price|price type);

examples:
Donation(price)(please enter donation|title-below)(10.00|+);
Reduce By(price)(How much to subtract|field-below)(|-);

Text & Textarea:
Name(text)(tip here|location)(default text|price|charge type);

charge types: char,char_nospace,word,all
Note: add "-d" to end of charge type to show cost break down in cart

examples:
name(text)(1.00 per character|field-below)(|1.00|char);
message(textarea)(5.00 per word|title-hover)(message here|5.00|word);
Test(text)(1.50 per character|title-hover)(|1.50|char_nospace-d); 

Number:
Name(number)(tip here|location)(default number|price);

example:
Number of chocolates(number)(enter # of chocolates|title-hover)(10|0.25);

Date:
Name(date)(tip here|location)(|);


Checkbox & Radio & Select & Multiple:
Name(checkbox)(tip here|location)(option1|image1,option2*|image2,option3 [+5.00]|image3);
* = selected

images work for checkboxes, radio buttons, and select boxes.

examples:
Donate(checkbox)(tip here|title-hover)(Widows [+5.00],Orphans [+10.00]);
Colors(radio)(tip here|title-hover)(Blue [+5.00]|images/img_blue.jpg,Red [+10.00]|images/img_red.jpg);

File:
Name(file)(tip here|title-below)(directory|file types|charge|max file size|min file size);

Max file size & Min file size measures in bytes.

examples:
File Upload(file)(upload file of type .jpg or .doc|title-below)(images/|.jpg,.doc);
Art Work(file)(upload artwork, $20.00 charge|title-below)(images/|.jpg,.doc|20.00);
Picture(file)(upload picture, $20.00 charge, max file of .5MB|title-below)(images/|.jpg|20.00|500000|300);

Line:
Name(line)(tip-here|field-below)(custom line code);

examples:
Further Options(line)(here are more options|field-below)();
(line)(|)(<b>--------------------------------</b>);
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 11, 2007, 04:26:22 am
Here is a sample.  I entered the following data into the custom attributes field:

Date(date)(tip here|field-above)(|);
Color Options(checkbox)(another tip|title-hover)(test1 [+10.00]|images/img_1.jpg,test2 [-20.00]|images/img_2.jpg,test3 [-10.00]|images/img_3.jpg,test4 [+30.00]*|images/img_4.jpg,test5 [-5.00]|images/img_5.jpg);
Divide(line)(tip-here|field-below)(<b>---------------------------</b>);
Engrave(text)(3.00 per character|field-below)(name here|3.00|char);
Donation(price-r)(help us out|field-below)(25.00|+);
File Upload(file)(20.00 for file upload|field-below)(images/|.jpg,.doc|20.00);


and it produced the following screen shots for me.
-barnett

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Bach on May 11, 2007, 10:23:39 am
Hi Barnett,

I have implemented the new code and it works great. Thanks!  :)

I have inserted 3 engraving lines, and they are not required, however the shop promts me that I need to select a variant?  ??? The engraving is just an option.

Am i missing something?

Would you rather that I post this in the original thread?

/cbach
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 11, 2007, 14:50:13 pm
I have inserted 3 engraving lines, and they are not required, however the shop promts me that I need to select a variant?  ??? The engraving is just an option.

Am i missing something?
/cbach
@cbach

Are there any other options you can add (like a radio button) that won't charge, just so the user can fill something out.  I'll look into this option...  could you post your custom attribute code you have?
Thanks
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: standby on May 11, 2007, 18:21:06 pm
My English isn´t very good, but I´ll try explain my question.

The problem:
I want to sell packaged products with the choice of what the customer wants to put in this package. For example, if you have a chocolates factory and wanted to sell boxes of chololates but let the choice for the customer of how much he wants in the box and how much boxes he wants.

I need some way of adding to cart the Total= (items per box) x (nº of  boxes)


The solution?:

I have a possible solution, buy I don´t know to code it:


Using attibutes:

- attribute 1: quantity per box
- attribute 2: box needed (default 0 , customer must select a quantity)

Then when customer change attribute 2 the program change the "add to cart quantity" (= attibute 1 x attribute 2).But I don´t know how code this step.

I found in an other thread a function which  "Searches for an attribute of a given name" (http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=20632.msg50385#msg50385)

Then using that function, if exist an attibute "box needed", that attributes input form in prodcut details need the param "onchange"  which change the variable $quantity in shop.product_details.php ( in ADD-TO-CART) $quantity= "quantity per box" x "box needed".


In general, I think is interesting to found a way to change "add to cart quantity" using attributes.

I post this here because I think this will be a good addition in this great hack.

Any help?

(Again, sorry for my English)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 11, 2007, 18:40:46 pm
In general, I think is interesting to found a way to change "add to cart quantity" using attributes.

I post this here because I think this will be a good addition in this great hack.

Any help?

this would be a good addition to the hack.  I'll look into it further, but I'm not sure how to appraoch it with the current hack.

I'm not sure why you would not just have the customer select the options they want and then fill in the quantity they want as normal, unless you're wanting to restrict the quantity to sets like 10,50,100, etc...?  Maybe i'm not understanding the scenario well.

What I'm understanding you say is the customer would enter in that they want 100 individual chocolates and then enters a quantity of 50 (which represents boxes).  That would be doable with this hack.

But I do see what you're saying about a multiplier function.  Maybe I could adjust the hack to add something like this.

# of chocolate(number)(tip here|field-below)(0.50);

something so that the user could enter the number of chocolates and then those each be charged .50 cents and then will be multiplied by the number of boxes!

Is this what you mean?
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 11, 2007, 20:36:37 pm
this is a really great hack. I was wondering, is it a simple job to replace the javascript calender with a javascript colour swatch such as this:

http://www.free-color-picker.com/color-pop-combo.php
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: standby on May 11, 2007, 20:40:49 pm
Thanks for responding.

You can see the same problem (better explained) here:

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=25614.0

Quote
Using VM and Joomla, the website for my printing & copying business allows customers to place printing orders online. My situation is that my pricing breakdown is per page... but what if a customer wants several copies of a multiple page document? Well, until I figure that one out, I simply have two custom attribute fields: Number of Pages in Document, and Amount of Sets Needed. I instruct the customer that those two fields must be multiplied to achieve the right quantity, and that they must enter the solution to that equation manually.

I'd like to modify the code so that; a.)  the Quantity box updates automatically when these two fields are filled, b.) the Product is not added to the cart if either field is left blank, and c.) ....

This method has worked thus far, but there is always some confusion because no matter how easily you explain it, there's still always 3-4 persons who just can't grasp the concept for every 1-2 persons who do. Thusly, I must alleviate this confusion somehow, and that is the only way I can see as being the solution.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 11, 2007, 21:26:17 pm
I suck at php, but if someone can point to the files in question perhaps I can experiment.

Which file do I need to examine in order to modify the "charge extra for text per word" attributes?

I need the customer to enter a numerical figure for the amount of words (to be supplied as a .doc upload)

- say the customer wants 500 words at 3 dollars a word, I need the customer to enter the figure "500", and the price to be modified by 3*500.

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Bach on May 11, 2007, 22:05:51 pm
@cbach

Are there any other options you can add (like a radio button) that won't charge, just so the user can fill something out.  I'll look into this option...  could you post your custom attribute code you have?
Thanks
-barnett

Hi,

Do you ever sleep? :)

You can see th eproduct here:
https://shop.bachdan.dk/index.php?page=shop.product_details&category_id=10&flypage=shop.flypage&product_id=1&option=com_virtuemart&Itemid=26 (https://shop.bachdan.dk/index.php?page=shop.product_details&category_id=10&flypage=shop.flypage&product_id=1&option=com_virtuemart&Itemid=26)

If I don't want any engraving then I would just klik add to basket. And if I wanted engraving then I would select the font and type the text. But it tells me that I have to select a variant. I have made the custom attribute as simple as possible for testing purposes. But I can't seem to figure it out.
The backend and frontend php files are the ones from your zip package.

This is my variant section:
Code: [Select]
Model,1011 45 mm.[=52.80],1012 50 mm.[=59.20],1013 60 mm.[=63.20],1014 80 mm.[=92.80],1015 100 mm.[=111.20],1016 125 mm.[=113.60],1017 150 mm.[=188.80]
This is my code in the custom attribute section:
Code: [Select]
Skrifttyper(radio)(|)(Enkeltblok|/images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Gravering Linie 1(text)(|)(|field-below)(|1.00|char_nospace);
Gravering Linie 2(text)(|)(|field-below)(|1.00|char_nospace);
Gravering Linie 3(text)(|)(|field-below)(|1.00|char_nospace)

Sorry for the Danish language, can't seem to shake it. ;)

Have a nice "weekend".

/cbach

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 12, 2007, 15:57:22 pm
- say the customer wants 500 words at 3 dollars a word, I need the customer to enter the figure "500", and the price to be modified by 3*500.

I'm going to add a new attribute type soon which will allow for this.  It will look something like this:
Enter # of words(number)(3.00 a word|field-below)(3.00|*);

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 12, 2007, 16:00:59 pm
This is my variant section:
Code: [Select]
Model,1011 45 mm.[=52.80],1012 50 mm.[=59.20],1013 60 mm.[=63.20],1014 80 mm.[=92.80],1015 100 mm.[=111.20],1016 125 mm.[=113.60],1017 150 mm.[=188.80]
This is my code in the custom attribute section:
Code: [Select]
Skrifttyper(radio)(|)(Enkeltblok|/images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Gravering Linie 1(text)(|)(|field-below)(|1.00|char_nospace);
Gravering Linie 2(text)(|)(|field-below)(|1.00|char_nospace);
Gravering Linie 3(text)(|)(|field-below)(|1.00|char_nospace)

/cbach


your code should be this:

Code: [Select]
Skrifttyper(radio)(|)(Enkeltblok|/images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Gravering Linie 1(text)(|)(|1.00|char_nospace);
Gravering Linie 2(text)(|)(|1.00|char_nospace);
Gravering Linie 3(text)(|)(|1.00|char_nospace);

you had an extra () making four in all instead of three.  Hope that helps.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 12, 2007, 16:03:03 pm
- say the customer wants 500 words at 3 dollars a word, I need the customer to enter the figure "500", and the price to be modified by 3*500.

I'm going to add a new attribute type soon which will allow for this.  It will look something like this:
Enter # of words(number)(3.00 a word|field-below)(3.00|*);

-barnett

Great news. I think it would be a powerful and flexible addition to the hack.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 14, 2007, 02:39:23 am
I am trying a cheap hack, not really knowing what I'm doing. I am trying to replace the calender with a swatch.

In ps_product_custom_type I have simply changed the name of the javascript file. I'm guessing thsi is not enough?

$mainframe->addCustomHeadTag( '<script type="text/javascript" src="'. $mosConfig_live_site . '/includes/js/joomla.javascript.js"></script>' );
      mosCommonHTML::loadOverlib();
      mosCommonHTML::loadCalendar();


      $mainframe->addCustomHeadTag( '<script type="text/javascript" src="'. $mosConfig_live_site . '/includes/js/swatch/301a.js"></script>' );
      mosCommonHTML::loadOverlib();
      mosCommonHTML::loadCalendar();

here is the javascript

//*******************************************************************************
//Title:      FCP Combo-Chromatic Color Picker
//URL:        http://www.free-color-picker.com
//Product No. FCP201a
//Version:    1.2
//Date:       10/01/2006
//NOTE:       Permission given to use this script in ANY kind of applications IF
//            script code remains UNCHANGED and the anchor tag "powered by FCP"
//            remains valid and visible to the user.
//
//  Call:     showColorGrid3("input_field_id","span_id")
//  Add:      <DIV ID="COLORPICKER301" CLASS="COLORPICKER301"></DIV> anywhere in body
//*******************************************************************************
function getScrollY(){var scrOfX = 0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}return scrOfY;}document.write("<style>.colorpicker301{text-align:center;visibility:hidden;display:none;position:absolute;background-color:#FFF;border:solid 1px #CCC;padding:4px;z-index:999;filter:progid:DXImageTransform.Microsoft.Shadow(color=#D0D0D0,direction=135);}.o5582brd{border-bott6om:solid 1px #DFDFDF;border-right:solid 1px #DFDFDF;padding:0;width:12px;height:14px;}a.o5582n66,.o5582n66,.o5582n66a{font-family:arial,tahoma,sans-serif;text-decoration:underline;font-size:9px;color:#666;border:none;}.o5582n66,.o5582n66a{text-align:center;text-decoration:none;}a:hover.o5582n66{text-decoration:none;color:#FFA500;cursor:pointer;}.a01p3{padding:1px 4px 1px 2px;background:whitesmoke;border:solid 1px #DFDFDF;}</style>");function gett6op6(){csBrHt=0;if(typeof(window.innerWidth)=='number'){csBrHt=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){csBrHt=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){csBrHt=document.body.clientHeight;}ctop=((csBrHt/2)-132)+getScrollY();return ctop;}function getLeft6(){var csBrWt=0;if(typeof(window.innerWidth)=='number'){csBrWt=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){csBrWt=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){csBrWt=document.body.clientWidth;}cleft=(csBrWt/2)-125;return cleft;}var nocol1="&#78;&#79;&#32;&#67;&#79;&#76;&#79;&#82;",clos1="&#67;&#76;&#79;&#83;&#69;",tt6="&#70;&#82;&#69;&#69;&#45;&#67;&#79;&#76;&#79;&#82;&#45;&#80;&#73;&#67;&#75;&#69;&#82;&#46;&#67;&#79;&#77;",hm6="&#104;&#116;&#116;&#112;&#58;&#47;&#47;&#119;&#119;&#119;&#46;";hm6+=tt6;tt6="&#80;&#79;&#87;&#69;&#82;&#69;&#68;&#32;&#98;&#121;&#32;&#70;&#67;&#80;";function setCCbldID6(objID,val){document.getElementById(objID).value=val;}function setCCbldSty6(objID,prop,val){switch(prop){case "bc":if(objID!='none'){document.getElementById(objID).style.backgroundColor=val;}break;case "vs":document.getElementById(objID).style.visibility=val;break;case "ds":document.getElementById(objID).style.display=val;break;case "tp":document.getElementById(objID).style.top=val;break;case "lf":document.getElementById(objID).style.left=val;break;}}function putOBJxColor6(OBjElem,Samp,pigMent){if(pigMent!='x'){setCCbldID6(OBjElem,pigMent);setCCbldSty6(Samp,'bc',pigMent);}setCCbldSty6('colorpicker301','vs','hidden');setCCbldSty6('colorpicker301','ds','none');}function showColorGrid3(OBjElem,Sam){var objX=new Array('00','33','66','99','CC','FF');var c=0;var z='"'+OBjElem+'","'+Sam+'",""';var xl='"'+OBjElem+'","'+Sam+'","x"';var mid='';mid+='<center><table bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px #d31b1b;padding:2px;"><tr>';mid+="<td colspan='18' align='left' style='font-size:10px;background:#6666CC;color:#FFF;font-family:arial;'>&nbsp;Combo-Chromatic Selection Palette</td></tr><tr><td colspan='18' align='center' style='margin:0;padding:2px;height:14px;' ><input class='o5582n66' type='text' size='10' id='o5582n66' value='#FFFFFF'><input class='o5582n66a' type='text' size='2' style='width:14px;' id='o5582n66a' onclick='javascript:alert(\"click on selected swatch below...\");' value='' style='border:solid 1px #666;'>&nbsp;|&nbsp;<a class='o5582n66' href='javascript:onclick=putOBJxColor6("+z+")'><span class='a01p3'>"+nocol1+"</span></a>&nbsp;&nbsp;&nbsp;&nbsp;<a class='o5582n66' href='javascript:onclick=putOBJxColor6("+xl+")'><span class='a01p3'>"+clos1+"</span></a></td></tr><tr>";var br=1;for(o=0;o<6;o++){mid+='</tr><tr>';for(y=0;y<6;y++){if(y==3){mid+='</tr><tr>';}for(x=0;x<6;x++){var grid='';grid=objX
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 14, 2007, 02:49:48 am
Sorry for the basic html lesson, but how do I populate a custom attribute field from a pop up link? 

This is the the html of the link:


<script src="301a.js" type="text/javascript"></script>

</head>


<body>
<div id="colorpicker301" class="colorpicker301"></div>
Color: <input type="button" onclick="showColorGrid3('input_field_1','sample_1');" value="...">&nbsp;<input type="text" ID="input_field_1" size="9" value="">&nbsp;<input type="text" ID="sample_1" size="1" value="">

How do I get this value into a custom attribute text box.

If I could work this out, I could do all sorts of stuff, like use a form value to populate a donation box?

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 14, 2007, 04:36:39 am
@dubey

This is basically what you want.
1) upload the 301a.js file to /includes/js/swatch/ folder

2) open the ps_product_custom_type.php file and paste this code at the end:
Code: [Select]
/***************************************************
 *
 * Swatch element class
 * The class is is used to manage the product custom attribute type.
 *
***************************************************/
class ps_product_custom_type_swatch {
var $classname = "ps_product_custom_type_swatch";

    /**
* Outputs HTML for Custom Attribute
*/
function customTypeHTML($field=array()) {
global $mainframe, $mosConfig_live_site;
    $html = "";
$titlevar = trim($field['attr_pagevar']);
$attr_value = explode('|',$field['attr_value']);
$default_date = $attr_value[0];
$date_type = $attr_value[1];

$mainframe->addCustomHeadTag( '<script type="text/javascript" src="'. $mosConfig_live_site . '/includes/js/swatch/301a.js"></script>' );

if(!$field['attr_post_value']){
            $html .= "<div id='colorpicker301' class='colorpicker301'></div>";
$html .= "<input type=\"button\" value=\"Select Color\" onclick=\"showColorGrid3('rgb_id','sample_id');\" >";
$html .= "<input class=\"inputbox\" type=\"text\" name=\"".$titlevar."\" value=\"".$default_date."\" size=\"10\" ID=\"rgb_id\">";
$html .= "<input class=\"inputbox\" type=\"text\" size=\"2\" ID=\"sample_id\">";
} else {
            $html .= "<div id='colorpicker301' class='colorpicker301'></div>";
$html .= "<input type=\"button\" value=\"Select Color\" onclick=\"showColorGrid3('rgb_id','sample_id');\" >";
$html .= "<input class=\"inputbox\" type=\"text\" name=\"".$titlevar."\" value=\"".trim($field['attr_post_value'])."\" size=\"10\" ID=\"rgb_id\">";
$html .= "<input class=\"inputbox\" type=\"text\" size=\"2\" ID=\"sample_id\">";
}

return $html;
}

/**
* Outputs Secure Value for Custom Attribute
*/
function customTypeSecureValue($field=array()) {
return '';
}

/**
* Outputs & Processes the submitted data for Custom Attribute to Cart
*/
function customTypeProcess($value, $field=array()) {
return $value;
}

}

save the file.

3) Next enter in the swatch like this into the back end:

Color(swatch)(tip here|title-below)();

that should work.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 14, 2007, 04:46:48 am
Yes, that works perfectly. A million thank yous.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Bach on May 14, 2007, 08:39:42 am
your code should be this:

Code: [Select]
Skrifttyper(radio)(|)(Enkeltblok|/images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Gravering Linie 1(text)(|)(|1.00|char_nospace);
Gravering Linie 2(text)(|)(|1.00|char_nospace);
Gravering Linie 3(text)(|)(|1.00|char_nospace);

you had an extra () making four in all instead of three.  Hope that helps.
-barnett

Hi again,

Thanks for your reply.

I have removed the extra () in the code, and it does not work. It still tells me that I need to select a variant. It seems that I can't add products to the basket because of the radiobuttons:
Code: [Select]
Skrifttyper(radio)(|)(Enkeltblok|/images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);And if I remove the radiobuttons the custom fields at least need one character for adding the product to the basket.

Hope this makes sense? ???

/cbach

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on May 15, 2007, 11:12:59 am
Hi Barnett,

this is really great. it was worth wile the waiting for..
Some overseas questions, i looked at the code but it was too difficult for me :(

- how do i use a Euro sign (utf &#128) in the pricing for different options? I now see a $ sign?
- how can i center the custom attributes in the main body?
- there's a difference in layout using firefox and safari. Is the solution found in this hack or is it VM. Eg 3 pictures with radio buttons are in FF displayed horizontal, and in Safari vertical taking up a lot of space.

Any clues are more than welcome!! Hope i did not miss anything...
Hope there are answers, im dying to get this work.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 15, 2007, 15:04:25 pm
- how do i use a Euro sign (utf &#128) in the pricing for different options? I now see a $ sign?
- how can i center the custom attributes in the main body?
- there's a difference in layout using firefox and safari. Is the solution found in this hack or is it VM. Eg 3 pictures with radio buttons are in FF displayed horizontal, and in Safari vertical taking up a lot of space.

1.  I think the default currency type is set in VM, unless you did that and now the hack turned it back to American dollars... if so I'll take a look.

2-3. These are CSS styling questions and don't really concern this hack.  Look at the HTML outputted by the hack (view source on your shopping cart) to see what tags, classes, and IDs are produced so you style them appropriately.  Here is a tutorial on floating image thumbnails:
http://css.maxdesign.com.au/floatutorial/tutorial0407.htm (http://css.maxdesign.com.au/floatutorial/tutorial0407.htm)

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on May 15, 2007, 17:05:31 pm
Hi barnett,


1- i set the currency sign in the shop-details to &#128, his works i guess since all the prices of products are shown in Euro

<Update> Found it: in file ps_product_custom_type.php the $ sign is hard coded. I'll dive into it. i also discoverred that
- the amount used (in my case radio) is ex VAT. I'll have a check as well...
- display of the attribute name is in safari next to the image whilst in ff above the image giving a different layout

2-3 i'll read the tutorial. I found out up to now that i can infuence som of the layout making my own browse page & flypage. The center is easy then. The difficulty is that the page is built up using html tables. I'm learning :)

Txs for looking into the euro thing, and txs for this great module!
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: william on May 16, 2007, 09:31:58 am
greetings,

1st off, thanks for developing this great modification!

Now, i have several questions,
1. when i do not include a [+x.xx] behind a attribute name, the attribute does not get recorded when adding to cart.  example:

Black|images/stories/color/BLACK.gif <-- the attribute Black doesnt show on the view cart page

Black [+10.00]|images/stories/color/BLACK.gif <-- the attribute Black shows up in view cart page

How can i fix this little bug?

2. Currently, is it possible make add to cart button updates the selection but not direct the customer to the view cart page?

thanks in advance for any and all inputs

vm noob #842 =)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Bach on May 16, 2007, 11:44:27 am
Hi,

The other problem was a syntax error, but now I have two new issues. :) And this time i tripple checked everythinf.

My attributes look like:
Code: [Select]
Linie 1(text)(|1)(|1.00|char_nospace);
Skrifttype(select)(|)(Enkeltblok|images/stories/gravering/eb.gif,Dobbeltblok*|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Linie 2(text)(|2)(|1.00|char_nospace);
Skrifttype(select)(|)(Enkeltblok*|images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Linie 3(text)(|3)(|1.00|char_nospace);
Skrifttype(select)(|)(Enkeltblok|images/stories/gravering/eb.gif,Dobbeltblok*|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif)

1) If I choose a different font in the dropdown at the top, then the one in the bottom of the page changes.

2) The char count and prices does not show up in the cart for line 2 & 3?

Again thanks for your work. :)

/cbach
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Andoni on May 16, 2007, 15:09:00 pm
Hello, this is a great hack, but i'm finding other thing that i think it's useful to joomla.

Add a Weight type to input the Gr. like you want, for example;

I have a meat product with 10€ by Kg.
I want to buy 100gr. of meat or 125gr or 900 gr.
I insert in this input the quantity, and then calculate € x Weight and obtains the price.
And more... this weight goes to weight product to calculate the shipping costs....

What do you think?

Sorry for my english!
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 16, 2007, 20:30:00 pm
greetings,

1st off, thanks for developing this great modification!

Now, i have several questions,
1. when i do not include a [+x.xx] behind a attribute name, the attribute does not get recorded when adding to cart.  example:

Black|images/stories/color/BLACK.gif <-- the attribute Black doesnt show on the view cart page

Black [+10.00]|images/stories/color/BLACK.gif <-- the attribute Black shows up in view cart page

How can i fix this little bug?

2. Currently, is it possible make add to cart button updates the selection but not direct the customer to the view cart page?

thanks in advance for any and all inputs

vm noob #842 =)

1. I'll look at this.  What attribute type are you using? checkbox, radio, select, etc.... also could you post your full line of attribute code?  thanks.

2.  This functionality is not handled by this hack.

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 16, 2007, 20:42:27 pm
Thanks for the great mod. I've just installed it and it's working well.

For my needs file upload is the most important/best feature. I was just thinking it would be really helpful if you could access or download the clients uploaded files while viewing their order in the admin screen. Is a link or something like this possible?

Thanks again,
Paul
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 16, 2007, 20:49:33 pm
Thanks for the great mod. I've just installed it and it's working well.

For my needs file upload is the most important/best feature. I was just thinking it would be really helpful if you could access or download the clients uploaded files while viewing their order in the admin screen. Is a link or something like this possible?

Thanks again,
Paul

currently this hack does not edit the admin experience, but I'll keep it in mind for the next release down the road.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: william on May 17, 2007, 01:04:20 am
greetings,

1st off, thanks for developing this great modification!

Now, i have several questions,
1. when i do not include a [+x.xx] behind a attribute name, the attribute does not get recorded when adding to cart.  example:

Black|images/stories/color/BLACK.gif <-- the attribute Black doesnt show on the view cart page

Black [+10.00]|images/stories/color/BLACK.gif <-- the attribute Black shows up in view cart page

How can i fix this little bug?

2. Currently, is it possible make add to cart button updates the selection but not direct the customer to the view cart page?

thanks in advance for any and all inputs

vm noob #842 =)

1. I'll look at this.  What attribute type are you using? checkbox, radio, select, etc.... also could you post your full line of attribute code?  thanks.

2.  This functionality is not handled by this hack.

-barnett

the line of codes i used is as following:

Size Options(Radio)(Select the SIZE)|title-hover)( Small [+0.00], Medium [+0.00], Large [+0.00], X-Large [+0.00], 2X-Large [+0.25] );Color Options(Radio)(Select the color and size, then enter quantity|title-hover)( Black [+0.00]|images/color/BLACK.gif, Red [+0.00]|images/color/RED.gif);  <-- this adds to shopping cart fine

Size Options(Radio)(Select the SIZE)|title-hover)( Small [+0.00], Medium [+0.00], Large [+0.00], X-Large [+0.00], 2X-Large [+0.25] );Color Options(Radio)(Select the color and size, then enter quantity|title-hover)( Black|images/color/BLACK.gif, Red|images/color/RED.gif);

<-- this one, doesnt catch the black or red attribute when adding to shopping cart.

and also, how do i modify the format these attributes are displayed on the frontend?

thanks

William
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 17, 2007, 06:33:55 am
A quick question (sorry if this was previously posted and I missed it) - for the text input lines is it possible to set the maximum number of characters a client can input? An example would be if I am engraving a trophy and can only fit 25 characters per line.

Thanks,
Paul
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 17, 2007, 15:50:36 pm
A quick question (sorry if this was previously posted and I missed it) - for the text input lines is it possible to set the maximum number of characters a client can input? An example would be if I am engraving a trophy and can only fit 25 characters per line.

Thanks,
Paul

currently that is not possible, but I'll look into it.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 17, 2007, 15:51:58 pm
the line of codes i used is as following:

Size Options(Radio)(Select the SIZE)|title-hover)( Small [+0.00], Medium [+0.00], Large [+0.00], X-Large [+0.00], 2X-Large [+0.25] );Color Options(Radio)(Select the color and size, then enter quantity|title-hover)( Black [+0.00]|images/color/BLACK.gif, Red [+0.00]|images/color/RED.gif);  <-- this adds to shopping cart fine

Size Options(Radio)(Select the SIZE)|title-hover)( Small [+0.00], Medium [+0.00], Large [+0.00], X-Large [+0.00], 2X-Large [+0.25] );Color Options(Radio)(Select the color and size, then enter quantity|title-hover)( Black|images/color/BLACK.gif, Red|images/color/RED.gif);

<-- this one, doesnt catch the black or red attribute when adding to shopping cart.

and also, how do i modify the format these attributes are displayed on the frontend?

thanks

William

Thanks william-
I can replicate the error now so I will work on a fix soon.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 17, 2007, 20:03:31 pm
New Update available:

- fixed files in step 1
- fixed lines in step 5
- fixed multiple select box image thumbnail problem
- fixed blank results for non-charge radio, checkbox, select, & multiple items
- added NEW attribute type (number)... see syntax

The update is in the first post of this thread.  You can download the new files.
Enjoy.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 17, 2007, 20:19:59 pm
Hi,

The other problem was a syntax error, but now I have two new issues. :) And this time i tripple checked everythinf.

My attributes look like:
Code: [Select]
Linie 1(text)(|1)(|1.00|char_nospace);
Skrifttype(select)(|)(Enkeltblok|images/stories/gravering/eb.gif,Dobbeltblok*|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Linie 2(text)(|2)(|1.00|char_nospace);
Skrifttype(select)(|)(Enkeltblok*|images/stories/gravering/eb.gif,Dobbeltblok|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif);
Linie 3(text)(|3)(|1.00|char_nospace);
Skrifttype(select)(|)(Enkeltblok|images/stories/gravering/eb.gif,Dobbeltblok*|/images/stories/gravering/db.gif,Enkeltskriveskrift|/images/stories/gravering/es.gif,Dobbeltskriveskrift|/images/stories/gravering/ds.gif)

1) If I choose a different font in the dropdown at the top, then the one in the bottom of the page changes.

2) The char count and prices does not show up in the cart for line 2 & 3?

Again thanks for your work. :)

/cbach

these have been fixed and updated on the first post.  However lines like this:
Code: [Select]
Linie 2(text)(|2)(|1.00|char_nospace);
need to be like this:
Code: [Select]
Linie 2(text)(|)(|1.00|char_nospace);

also your attributes need to have distinct names like Skrifttype 1, Skrifttype 2, Skrifttype 3

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: william on May 17, 2007, 23:55:05 pm
hi barnett,

thanks for the quick update.  now the attribute without price adjustment indeed gets updated correctly in cart.

however, i've found another bug.  it is when i try to remove an item from shopping cart, it doesnt doesnt get removed, and updating quantity doesnt work neither

please look into this

thanks :)

snoo
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 18, 2007, 05:37:39 am
hi barnett,

thanks for the quick update.  now the attribute without price adjustment indeed gets updated correctly in cart.

however, i've found another bug.  it is when i try to remove an item from shopping cart, it doesnt doesnt get removed, and updating quantity doesnt work neither

please look into this

thanks :)

snoo

I used your previous attribute code:
Code: [Select]
Size Options(Radio)(Select the SIZE)|title-hover)( Small [+0.00], Medium [+0.00], Large [+0.00], X-Large [+0.00], 2X-Large [+0.25] );Color Options(Radio)(Select the color and size, then enter quantity|title-hover)( Black|images/color/BLACK.gif, Red|images/color/RED.gif);
and had no problem removing items or updating them.

Please post the code you are having trouble with.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: william on May 18, 2007, 07:38:21 am
ops..

i accidently added a number before the code, caused the problem.  it's fix now


-> i would like to edit the display format of the attributes, which file do i modify???  <-

thanks!

snoo
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 18, 2007, 15:59:00 pm
ops..

i accidently added a number before the code, caused the problem.  it's fix now


-> i would like to edit the display format of the attributes, which file do i modify???  <-

thanks!

snoo

the attribute label, help tip, and wrapper are found in the ps_product_custom_attribute.php file.

while the individual attribute elements or filed input are found in ps_product_custom_type.php file.

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Nick on May 18, 2007, 16:14:47 pm
Hi,

I must be having a stupid moment here.   :-[ 

I have uploaded all the files in the first post. 
I am running 1.0.10.

However it appears as though the hack simply isn't working.  Please take a look at the image below. 

Now the only thing I can think of is that Safe Mode is on????



[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 18, 2007, 17:14:30 pm
Hi,

I must be having a stupid moment here.   :-[ 

I have uploaded all the files in the first post. 
I am running 1.0.10.

However it appears as though the hack simply isn't working.  Please take a look at the image below. 

Now the only thing I can think of is that Safe Mode is on????

@ Nick-

please post the Attribute Code you are using!

Did you upload all four files in the .zip to the /administrator/components/com_virtuemart/classes/ folder?

do you have a link I could take a look at?
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 18, 2007, 17:30:11 pm
Hi Barnett,

I was asked by a client yesterday (they are uploading photos) if it is possible to set a minimum or maximum file size for file upload?

Thanks,
Paul
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Nick on May 18, 2007, 17:45:07 pm
Hi Barnett,

Here's the link:


http://www.garvel.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=17&category_id=4&manufacturer_id=0&option=com_virtuemart&Itemid=7


And the code that is the attribute is the example:

Donation(price)(please enter donation|title-below)(10.00|+)

I unzipped the files and ftp'd them in the normal manner!  I even tested one by putting in a comment just to make sure I was overwriting (the safe mode issue) - appeared as good as gold.

Thanks
N
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 19, 2007, 06:19:57 am

http://www.garvel.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=17&category_id=4&manufacturer_id=0&option=com_virtuemart&Itemid=7

And the code that is the attribute is the example:
Donation(price)(please enter donation|title-below)(10.00|+)
I unzipped the files and ftp'd them in the normal manner!  I even tested one by putting in a comment just to make sure I was overwriting (the safe mode issue) - appeared as good as gold.

It looks like you put the code it the regular attribute area, rather than the "custom attribute" area.  Can't tell for sure b/c I don't have access to your backend.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 19, 2007, 07:01:42 am
Hi Barnett,

I was asked by a client yesterday (they are uploading photos) if it is possible to set a minimum or maximum file size for file upload?

Thanks,
Paul

I've updated the hack to now allow for maximum & minimum file upload sizes.  The syntax is:
Name(file)(tip here|title-below)(directory|file types|charge|max file size|min file size);

download the new files and replace the ps_product_custum_type.php file.
Haven't tested this so please let me know if it works.
-barnett

NOTE: your server settings must allow for the max file size to be reached otherwise the file may not upload fully.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Marco on May 19, 2007, 14:00:42 pm
Hi

Thanks for this great update on this great hack.

My question.
Is it possible to show the prices in the attributes incl. tax?
I'm used for the attributes to fill in the + price excl. tax in the backend, and they show up in the frontend incl. tax.
That's ok, but with this version they show up excl. tax.
In the cart they show up incl. tax again.
The normal attributes show up in the frontend incl. tax, so it would be nice if attributes and custom attributes act the same way.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 19, 2007, 18:10:27 pm
Thanks for the really quick reply. I replaced the updated ps_product_custum_type.php but it's returning the following error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 486

I also wanted to check when you input the minimum and maximum file size what units are used? Is it a number only or do you indicate units - kb, mb etc?

Thanks again,
Paul
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: huub on May 19, 2007, 20:17:22 pm
This tool is really fantastic and of course there will always be wishes for additional things, but the fact remains that this must be one of the best extensions for VM.

My wish is probably not so complicated but makes a lot of difference for visitors/customers.
If I add a price to an attribute (for instance 10.00) this amount is without taxes, even when the prices in the shop are inc. taxes. This is a bit confusing for customers because when they pick this option they think they have to pay 10.00 more but at checkout or in there cart they see that it is 10.00 + taxes.

I hope I made clear what I wanted to explain.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: standby on May 19, 2007, 22:05:31 pm
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 486

I get the same error than "Paul" when I overwrite the four files  (custom_attribute_2.0_hack.zip) over a clear install.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 20, 2007, 01:07:03 am
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /administrator/components/com_virtuemart/classes/ps_product_custom_type.php on line 486

I get the same error than "Paul" when I overwrite the four files  (custom_attribute_2.0_hack.zip) over a clear install.

Fixed it and re-uploaded the files.  Sorry about that.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 20, 2007, 01:08:00 am
This tool is really fantastic and of course there will always be wishes for additional things, but the fact remains that this must be one of the best extensions for VM.

My wish is probably not so complicated but makes a lot of difference for visitors/customers.
If I add a price to an attribute (for instance 10.00) this amount is without taxes, even when the prices in the shop are inc. taxes. This is a bit confusing for customers because when they pick this option they think they have to pay 10.00 more but at checkout or in there cart they see that it is 10.00 + taxes.

I hope I made clear what I wanted to explain.

I'll look into this issue, but it may be a VM issue and not this hack, but I'll check into it.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 20, 2007, 02:11:50 am
Thanks for the quick fix. The parse error is gone but now I'm getting a message

Error: File Type is not Supported

This message displays when a file upload is selected and the product added to the cart. I've set .jpg as a file type and I'm trying to upload a jpg. The file is not uploaded or listed in the item attributes when viewing the cart.

Also wondering what is the correct way to input/specify file size limits?

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Nick on May 20, 2007, 09:46:45 am
Hi Barnett,

Hi,

I must be having a stupid moment here.   :-[ 

I have uploaded all the files in the first post. 
I am running 1.0.10.

However it appears as though the hack simply isn't working.  Please take a look at the image below. 

Now the only thing I can think of is that Safe Mode is on????


I knew I was having a dumb moment.....thanks.

However I have put in some more complicated code and it is not rendering correctly for example the  divide line comes up with its title.  URL as before.  I have e-mailed you an admin access so you can see the backend.

Thanks

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 20, 2007, 21:09:52 pm
- say the customer wants 500 words at 3 dollars a word, I need the customer to enter the figure "500", and the price to be modified by 3*500.

I'm going to add a new attribute type soon which will allow for this.  It will look something like this:
Enter # of words(number)(3.00 a word|field-below)(3.00|*);

-barnett

Hi Barnett, I hope you being rewarded in some way for doing all this. Any news on the above?

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 20, 2007, 21:59:54 pm
- say the customer wants 500 words at 3 dollars a word, I need the customer to enter the figure "500", and the price to be modified by 3*500.

I'm going to add a new attribute type soon which will allow for this.  It will look something like this:
Enter # of words(number)(3.00 a word|field-below)(3.00|*);

-barnett

Hi Barnett, I hope you being rewarded in some way for doing all this. Any news on the above?

Yes this was added about two update ago... see the first thread for the new files and the second thread for the exact syntax to use.

My reward is everyone's thankfulness as well as good PR for future things I may release.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 20, 2007, 22:01:33 pm
Thanks for the quick fix. The parse error is gone but now I'm getting a message

Error: File Type is not Supported

This message displays when a file upload is selected and the product added to the cart. I've set .jpg as a file type and I'm trying to upload a jpg. The file is not uploaded or listed in the item attributes when viewing the cart.

Also wondering what is the correct way to input/specify file size limits?

try also adding .jpeg to the file types.  Or try another file type all together like .doc (MS WORD) and see if that works.  If not I'll bug test it.

Max file size and Min file size #'s are measured in bytes.  Do not add any ending like kb, mb, etc.... you'll have to calculate all that into bytes.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 20, 2007, 22:18:18 pm
Hi Barnett,

Hi,

I must be having a stupid moment here.   :-[ 

I have uploaded all the files in the first post. 
I am running 1.0.10.

However it appears as though the hack simply isn't working.  Please take a look at the image below. 

Now the only thing I can think of is that Safe Mode is on????


I knew I was having a dumb moment.....thanks.

However I have put in some more complicated code and it is not rendering correctly for example the  divide line comes up with its title.  URL as before.  I have e-mailed you an admin access so you can see the backend.

Thanks

The hack seems to be working fine.  The reason no images appear is because you're using the example I gave which links to images which aren't in your install.  Also you can either rename "Divide" to something more appropriate or just add a space " " instead.  I'm not sure what specifically you're having problems with.....

it seems that you got the overall hack working... layout is more of a design issue.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 20, 2007, 22:37:01 pm
Thanks for the file size input requirements. I'm still getting the file type not supported error though. For testing I've set the min and max sizes to 100kb and 7mb as well as included '.jpeg' as a file type. If it helps this is the attribute setting I'm using is:

Picture 1(file)(jpg files only|field-below)(images/|.jpg,.jpeg,.doc|0.00|7340032|102400)

ps. Please ignore the IM I sent you earlier - you've already answered most of those questions.

Paul
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 20, 2007, 22:43:26 pm
Thanks Barnett. I am getting these "file type error" upload messages too since I changed my hosting yesterday, which makes me thing its not a hack issue . however, i am using the same upload folder for my docman repository and that is working fine.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 20, 2007, 22:48:54 pm
Thanks Barnett. I am getting these "file type error" upload messages too since I changed my hosting yesterday, which makes me thing its not a hack issue . however, i am using the same upload folder for my docman repository and that is working fine.

I've only started getting this error since updating to the latest ps_product_custom_type.php file - the one incorporating minimum / maximum file sizes. If I go back to an older version of this file everything works fine.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Bach on May 21, 2007, 08:32:33 am

also your attributes need to have distinct names like Skrifttype 1, Skrifttype 2, Skrifttype 3

-barnett

Hi,

Thanks for all your time. Do you have a PayPal account or something?

There's is just one small bug left, Line 2 & 3 is not counted and added to the shoppingcart. Could you point me in the right direction?

I really hope to resolve this issue soon, we can't wait to get online with our new webshop. :o)

EDIT: This is only an issue in IE. It works like a charm in FF. ???

/cbach
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Nick on May 21, 2007, 08:52:00 am

The hack seems to be working fine.  The reason no images appear is because you're using the example I gave which links to images which aren't in your install.  Also you can either rename "Divide" to something more appropriate or just add a space " " instead.  I'm not sure what specifically you're having problems with.....

it seems that you got the overall hack working... layout is more of a design issue.
-barnett
Thanks - I'll start putting in the code.

N
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on May 21, 2007, 12:15:52 pm
Hi,

Installed the update, works fine :)

Anybody using safari and experiencing probems with textboxes?

I defined:

Tekst(textarea)(5.00 per word|title-hover)(Your text here|5.00|word);

Works fine in FF but is leaving my cart empty when ordered (no message shown).
Anybody has a clue or pointer?

<Update>
Narrowed it down to the following definition:

Tekst(textarea)(5.00 per woord|title-hover)(Your text here|5.00|word);
Kaart(radio)(kaartje|title-hover)(blauw [+5.00]|,rood* [+10.00]|)

If I define the custom fields in above order, it works fine, the text is displayed in cart. If i switch the definition to beneath order (the other way around), no text of textarea is displayed in Safari.

Kaart(radio)(kaartje|title-hover)(blauw [+5.00]|,rood* [+10.00]|);
Tekst(textarea)(5.00 per woord|title-hover)(Your text here|5.00|word);

Second: the selected option with * also workst fine in FF, but does not work in Safari.

Somebody can give a hand please/idea? ( i cleared the cache :)


Regards
brigitte


Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 21, 2007, 12:39:22 pm
Thanks Barnett. I am getting these "file type error" upload messages too since I changed my hosting yesterday, which makes me thing its not a hack issue . however, i am using the same upload folder for my docman repository and that is working fine.

I've only started getting this error since updating to the latest ps_product_custom_type.php file - the one incorporating minimum / maximum file sizes. If I go back to an older version of this file everything works fine.

Is it possible to post these old versions to the thread? They might be useful.

I am getting this message now:

Fatal error: Cannot instantiate non-existent class: ps_product_custom_type_ in /home/*****/public_html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 68
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Mike on May 21, 2007, 20:25:22 pm
I have got stuck at Step 4 in file ps_product_attribute.php:

The instruction is to replace the code begining:

"// added for custom fields by denie van kleef....."

with the block of code starting

"// added for custom fields by ted barnett...."

but the file already contains the "ted barnett" code.

Are the pictures the wrong way round? Or has this code already been replaced in the files?

Similarly, step 6 seems already to be done in the file ps_product.php.

If I presume the work is done and leave these 2 steps out, VM fails.

Can anyone help?

Thanks

Mike
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on May 21, 2007, 20:55:47 pm
Hi Mike,

I  just installed all the files which are in the zip, that is copied them to the right directory. It worked fine for me! Did not do any editing at all, exept my own hacks :)

Maybe this will help you..
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 22, 2007, 15:58:00 pm
Hi Mike,

I  just installed all the files which are in the zip, that is copied them to the right directory. It worked fine for me! Did not do any editing at all, exept my own hacks :)

Maybe this will help you..


I just did a completely fresh install with a new database, on a fresh copy of joomla, [1.0.12] with only the main Virtuemart componant and module, [ and I'm still getting the error. [1.0.10 ]
Hi Mike,

I  just installed all the files which are in the zip, that is copied them to the right directory. It worked fine for me! Did not do any editing at all, exept my own hacks :)

Maybe this will help you..


hi, thanks. Can you confirm that your upload function works ok? I have tried a completely fress installation on a new database and still get the error? could this be a permissions issue?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: scott on May 22, 2007, 16:32:41 pm
i have done a fresh install and i also get the filetype not supported message. I know that folder can be uploaded to. I used another hack to test it. So i am stuck as well. Great hack it would be the perfect thing if i could get it to work. here is my snippet i am using:  Print Size(checkbox-r)(Please check the print size you need|title-hover)(2 Wallets [+0.40]|photos/Zapotec.bmp,3.5x5 [+0.25],4x6 [+0.29],5x7 [+1.75],8x10 [+5.00],11x14 [+12.00],12x18 [+15.00];
Paper Choice(checkbox-r)(Select a finish|title-hover)(Gloss,Matte;
File Upload(file-r)(|)(photos/|.jpg,.bmp||3000000|300)
any help would be appreciated. Thanks and great work.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 00:43:13 am
hey everyone-

I realize that the new update had a bug in the file upload.  I hope to fix it in the next couple of days.  Sorry I haven't been around the last day or so.... work things come first.  So hold tight.  If someone wants to post the old file they can on this thread.  otherwise I'll try to get to it in the next day or so.

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Thomas Test on May 23, 2007, 17:38:07 pm
Hi everybody,

i hope one of you guys can help me out !?
I already browsed 90% of the Web including this board and couldn't find anything !

What we want to do:

We are selling personalised product (various kind of printing / engraving etc).
Therefor the customers uploads the file he wants to have printed.
Mostly (99%) this would be a picture.

What we need to know:

I) Is there any way the uploaded file is attached to the order list in the backend of VM ?
II) It should be possible for all customers, not only for those who registred !? Any chance?
III) The picture should be shown for each product as well as for each category if products have been ordered in different categories (e.g. T-Shirt in S ; XL ; L) different sizes same picture.

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 22:15:40 pm
Ok I've re-written the file upload script and tested it so it should work now.  See the first thread for the new files.

I also took care of the issue of the file upload always defaulting to being required.  Now if you don't mark it as required then no file is needed to be uploaded and a "No file was uploaded" message will be attached to the cart if the user decided not to upload a file.

-- UPDATED -- 5-23-07
- fixed "File Type Error" for file upload
- fixed File Upload always defaulting to required
- fixed Default Checked Radio & Check boxes for Safari (haven't tested)

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 22:17:45 pm
i have done a fresh install and i also get the filetype not supported message. I know that folder can be uploaded to. I used another hack to test it. So i am stuck as well. Great hack it would be the perfect thing if i could get it to work. here is my snippet i am using:  Print Size(checkbox-r)(Please check the print size you need|title-hover)(2 Wallets [+0.40]|photos/Zapotec.bmp,3.5x5 [+0.25],4x6 [+0.29],5x7 [+1.75],8x10 [+5.00],11x14 [+12.00],12x18 [+15.00];
Paper Choice(checkbox-r)(Select a finish|title-hover)(Gloss,Matte;
File Upload(file-r)(|)(photos/|.jpg,.bmp||3000000|300)
any help would be appreciated. Thanks and great work.

I've fixed the file upload.... but check your syntax as you are missing some end ")"

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 22:30:36 pm
Hi everybody,

i hope one of you guys can help me out !?
I already browsed 90% of the Web including this board and couldn't find anything !

What we want to do:

We are selling personalised product (various kind of printing / engraving etc).
Therefor the customers uploads the file he wants to have printed.
Mostly (99%) this would be a picture.

What we need to know:

I) Is there any way the uploaded file is attached to the order list in the backend of VM ?
II) It should be possible for all customers, not only for those who registred !? Any chance?
III) The picture should be shown for each product as well as for each category if products have been ordered in different categories (e.g. T-Shirt in S ; XL ; L) different sizes same picture.

1) the file name of the file that is uploaded appears on the order in the backend like so:
example) File Upload: filename.jpg
It does not appear on the "Order List" page which shows all of your orders... but when you click on a specific order it appears.

2) I think it should work for registered and non-registered alike.

3)  this hack also allows for you to show image thumbnails for each option... if that is what you mean.

I think some other people here are using this hack for engraving as well.
-barnett

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 23:56:31 pm
I've added another small update which corrects the problem of multiple attributes not calculating correctly in IE.  See the new files on the first thread.

-barnett

-- UPDATED -- 5-23-07
- fixed multiple attributes of same type not being calculated in IE bug
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 23:58:11 pm
There's is just one small bug left, Line 2 & 3 is not counted and added to the shoppingcart. Could you point me in the right direction?

I really hope to resolve this issue soon, we can't wait to get online with our new webshop. :o)

EDIT: This is only an issue in IE. It works like a charm in FF. ???

/cbach
the new update fixes this problem.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 23, 2007, 23:59:15 pm
Hi,

Installed the update, works fine :)

Anybody using safari and experiencing probems with textboxes?

I defined:

Tekst(textarea)(5.00 per word|title-hover)(Your text here|5.00|word);

Works fine in FF but is leaving my cart empty when ordered (no message shown).
Anybody has a clue or pointer?

<Update>
Narrowed it down to the following definition:

Tekst(textarea)(5.00 per woord|title-hover)(Your text here|5.00|word);
Kaart(radio)(kaartje|title-hover)(blauw [+5.00]|,rood* [+10.00]|)

If I define the custom fields in above order, it works fine, the text is displayed in cart. If i switch the definition to beneath order (the other way around), no text of textarea is displayed in Safari.

Kaart(radio)(kaartje|title-hover)(blauw [+5.00]|,rood* [+10.00]|);
Tekst(textarea)(5.00 per woord|title-hover)(Your text here|5.00|word);

Second: the selected option with * also workst fine in FF, but does not work in Safari.

Somebody can give a hand please/idea? ( i cleared the cache :)

Regards
brigitte

I think the new update should fix both problems.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 24, 2007, 00:43:05 am
I've just installed the latest update and it's working much better now.

The min/max file limits are working well. The error message is a nice touch too. This isn't really an issue but if a product has several files to upload, is it possible for the error message to indicate which attribute is in error if the file size is wrong?

Something else I noticed is if I have 2 upload fields and upload 2 files everything is fine. Similarly if I upload no files everything is fine - the no files uploaded message displays.
However if I upload 1 file and leave the second field blank I get the 'file type not supported' error instead of the new 'No file was uploaded' message. Any thoughts?

Thanks again,
Paul

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 24, 2007, 01:15:10 am
I've just installed the latest update and it's working much better now.

The min/max file limits are working well. The error message is a nice touch too. This isn't really an issue but if a product has several files to upload, is it possible for the error message to indicate which attribute is in error if the file size is wrong?

Something else I noticed is if I have 2 upload fields and upload 2 files everything is fine. Similarly if I upload no files everything is fine - the no files uploaded message displays.
However if I upload 1 file and leave the second field blank I get the 'file type not supported' error instead of the new 'No file was uploaded' message. Any thoughts?

Thanks again,
Paul

I've now fixed this issue... see new files on first thread.
-barnett

-- UPDATED -- 5-23-07
- fixed file upload to play nice w/ multiple file uploads
- print file name to screen when there is an error
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Paul on May 24, 2007, 01:25:58 am
Wow - that was fast. Just installed the fix and it's working perfectly now.

 Paul
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on May 24, 2007, 09:45:20 am
Hi Barnett!

Installed update and Safari problems are gone now! Txs for helping the mac-community!

2 questions:

- upload: silly, but were/how can i store the uploaded file to use in eg printing?
- css safari (sorry) name of picture in selectbox is displayed right of the image. FF displays it above the image which i think is nicer. I'm not really a css guru so i cannot find this in your files to fix. Any hints?

I'm happy to test things for you in Safari, btw.

Thx for the fixes!
Brigitte
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Bach on May 24, 2007, 11:17:13 am
There's is just one small bug left, Line 2 & 3 is not counted and added to the shoppingcart. Could you point me in the right direction?

I really hope to resolve this issue soon, we can't wait to get online with our new webshop. :o)

EDIT: This is only an issue in IE. It works like a charm in FF. ???

/cbach
the new update fixes this problem.
-barnett

Thank you. :)

I have one simple question, the text entered on the product page is countet and multiplied on the basket. What if I wanted to specify it more on the invoice like: 14 chars of 1.00 MONEY: 14.00 MONEY.
Where do I change this? I have looked through the files in your zip file and I can't locate it.

I have another small problem with images for a select box. It works in FF but in IE it returns a JavaScript error?
http://shor.ter.dk/926843280 (http://shor.ter.dk/926843280)

P.S.: You still haven't told me if you had a PayPal account. I would really like to donate something for all your work.

/cbach

EDIT: I fixed the error removing spaces in the title of the field. IE is wierd, FF FTW! :)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 24, 2007, 22:54:27 pm
Hi Barnett!

Installed update and Safari problems are gone now! Txs for helping the mac-community!

2 questions:

- upload: silly, but were/how can i store the uploaded file to use in eg printing?
- css safari (sorry) name of picture in selectbox is displayed right of the image. FF displays it above the image which i think is nicer. I'm not really a css guru so i cannot find this in your files to fix. Any hints?

I'm happy to test things for you in Safari, btw.

Thx for the fixes!
Brigitte

Glad to hear it worked in Safari.

1)  you can upload the file to any directory on your webserver you want... (see syntax for file upload)  then you'd have to have some other component or script to do anything else with the file.  But that is beyond this hack.

2) Could you please post a screen capture so that I can see what it is actually doing..... since I don't have safari.... or if any one would like to give me a mac I'll take that option too :)

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 24, 2007, 23:16:48 pm
Thank you. :)

I have one simple question, the text entered on the product page is countet and multiplied on the basket. What if I wanted to specify it more on the invoice like: 14 chars of 1.00 MONEY: 14.00 MONEY.
Where do I change this? I have looked through the files in your zip file and I can't locate it.

I have another small problem with images for a select box. It works in FF but in IE it returns a JavaScript error?
http://shor.ter.dk/926843280 (http://shor.ter.dk/926843280)

P.S.: You still haven't told me if you had a PayPal account. I would really like to donate something for all your work.

/cbach

EDIT: I fixed the error removing spaces in the title of the field. IE is wierd, FF FTW! :)

there seems to be a problem w/ the select boxes in IE7 which shows the "label" of the options rather than the "value".  Since the image switching uses labels it then shows the image path rather than the value.  I'll look into fixing this....

I'll also look into the added cost description for text & text area fields.
-barnett

ps.  I sent you a PM about paypal
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 25, 2007, 00:35:07 am
New update.  See first thread for files.  This fixes a major display bug in IE7 with drop-downs.  Also added cbach's requested feature.
-barnett

-- UPDATED -- 5-24-07
- fixed IE7 bug: image path was appearing in drop-down select
- added "-d" option to text and textarea charge types to show cost break down in cart... see syntax
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 25, 2007, 02:34:48 am
Is anybody else getting the message "Error: File/Image Upload Error" with the new update?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 25, 2007, 03:51:30 am
Is anybody else getting the message "Error: File/Image Upload Error" with the new update?

please post your attribute code being used.

Is the folder you are uploading to have the correct permissions set?

Also check what is the maximum file size your server allows?

I don't seem to have issues with the file upload.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on May 25, 2007, 09:01:49 am
Hi Barnett,

I will play with the upload, see how far i can get :)

Pictures Safari vs FF below so you can see the difference in layout (first pic is safari) . I'm curious if you'll see anything.
Happy to read your comment on safari, i switched some 2 years ago and i'm NEVER going back to she stone age (ok different discussion :):)

cheers
brigitte
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Ken Smith on May 26, 2007, 00:14:02 am
I installed the lasted version and i keep getting this error:
Info: To add this product into your cart you have to select a product variant on the details page.

attributes: Text to Engrave(text)(|)(|);
                Instructions(textarea)(|)(|);
                Upload Image(file)(|)(uploads/|.jpg,.bmp)

I've tried using just one attribute, and different attributes but i get the error every time.
Im using the latest stable versions of joomla and virtuemart.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 26, 2007, 00:31:35 am
I installed the lasted version and i keep getting this error:
Info: To add this product into your cart you have to select a product variant on the details page.


Ken,

I used to get this error when required fields were not filled in. I changed the language file to reflect this.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Ken Smith on May 26, 2007, 00:47:28 am
Dubey, thanks for the quick reply, but my problem is that none of the fields are supposed to be required. The only way i can add the product to cart is if all fields are filled in but i want them to be optional.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Ken Smith on May 26, 2007, 03:18:43 am
I installed the lasted version and i keep getting this error:
Info: To add this product into your cart you have to select a product variant on the details page.

attributes: Text to Engrave(text)(|)(|);
                Instructions(textarea)(|)(|);
                Upload Image(file)(|)(uploads/|.jpg,.bmp)

I've tried using just one attribute, and different attributes but i get the error every time.
Im using the latest stable versions of joomla and virtuemart.

I finally got it to work by entering a space for the default text.

Origional: Text to Engrave(text)(|)(|);
                Instructions(textarea)(|)(|);
                Upload Image(file)(|)(uploads/|.jpg,.bmp)

One that works: Text to Engrave(text)(|)( |);
                         Instructions(textarea)(|)( |);
                         Upload Image(file)(|)(uploads/|.jpg,.bmp)

I still get the error if i use the file attribute by itself though.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Foxx on May 26, 2007, 18:20:01 pm
Hi,

First of all, thanks for this great hack! Second, no surprise I think, a question..

Is it possible to charge different amounts per character if the height is increasing?
So, for example 30mm Fonts costs $1.00 per character and 40mm costs $1.25 per character and so on.

I went trough the forum, If I overlooked it, I'm sorry.

Regards,
Foxx

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 26, 2007, 18:40:56 pm
Hi,

First of all, thanks for this great hack! Second, no surprise I think, a question..

Is it possible to charge different amounts per character if the height is increasing?
So, for example 30mm Fonts costs $1.00 per character and 40mm costs $1.25 per character and so on.

I went trough the forum, If I overlooked it, I'm sorry.

Regards,
Foxx

Currently the hack does not have the capability for one attribute to change pricing depending on another.  However you might be able to accomplish what you want by having two separate text boxes.... one for 30mm and one for 40mm.  The syntax might look like this:

Engraving Text(line)(enter in the text in the appropriate textbox|field-below)(--------------------------------------------------------------);
30mm Engraving(text)(1.00 per character|field-below)(|1.00|char);
40mm Engraving(text)(1.25 per character|field-below)(|1.25|char);

maybe that would work for you.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 26, 2007, 18:42:41 pm
I finally got it to work by entering a space for the default text.

Origional: Text to Engrave(text)(|)(|);
                Instructions(textarea)(|)(|);
                Upload Image(file)(|)(uploads/|.jpg,.bmp)

One that works: Text to Engrave(text)(|)( |);
                         Instructions(textarea)(|)( |);
                         Upload Image(file)(|)(uploads/|.jpg,.bmp)

I still get the error if i use the file attribute by itself though.

Good solution... but I'll look into this further.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Foxx on May 26, 2007, 19:08:52 pm
Thanks for the quick response, the first solution should work if you don't have that much variations in heights, but I have allot..so it won't work for me.

I will be patient if another solution comes up. :)

Regards,
Foxx
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Marco on May 27, 2007, 08:04:11 am
Hi Barnett

Did you have a look at the price incl. tax allready?
Attributes and custom attributes act different now.
We have to show our prices incl. tax at product level and not only in the cart.

Maybe you  can put a paypall donation link in your personal info, so everybody who like to donate can.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Niels on May 27, 2007, 19:17:40 pm
Hi,

your componet is great, do you have in plan an ajax/java what else upload like this:

http://sourceforge.net/projects/uber-uploader

Best regards

Niels
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Niels on May 27, 2007, 19:30:16 pm
Hi,

I have small feature-request:

It would be good to rename the uploaded file after upload, because otherwise ot seems to become overwritten.

It would be cool to name it somethink like order-id-product.

Best regards

Niels
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Arthur Lee on May 28, 2007, 03:45:00 am
Hi, I'm a newbie to joomla and virtue mart. but i installed yr hack.  I'm trying the examples and have put the following into the "custom attribute box"
Code: [Select]
Donation(price)(please enter donation|title-below)(10.00|+);
Reduce By(price)(How much to subtract|title-below)(|-);
name(text)(1.00 per character|title-below)(|1.00|char);
message(textarea)(5.00 per word|title-hover)(message here|5.00|word);
Test(text)(1.50 per character|title-hover)(|1.50|char_nospace-d)

I got this far, but if you look at the website, it is confusing because of the format, notice how the first 2, donation, and subtract, run together.  Also the "checkout" now is in the middle.  http://firzt.com/joomla/index.php?page=shop.product_details&flypage=shop.flypage&product_id=30&category_id=10&manufacturer_id=0&option=com_virtuemart&Itemid=31 (http://firzt.com/joomla/index.php?page=shop.product_details&flypage=shop.flypage&product_id=30&category_id=10&manufacturer_id=0&option=com_virtuemart&Itemid=31)

How can I force everything to be left aligned?   Can I put a horizontal line or something between the different attributes?   How to force the check out now icon to be at the bottom.    Thx    p.s.  I get an error if i put a semi-colon (;) after the last custom attribute.   thx again.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 28, 2007, 18:54:46 pm
Hi,

your componet is great, do you have in plan an ajax/java what else upload like this:

http://sourceforge.net/projects/uber-uploader

Best regards

Niels

Yes their are plans to have more ajax integrations in both the backend and frontend.  It will most likely be another whole release until that comes along.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Niels on May 28, 2007, 19:00:23 pm
hi,

one more question.

Can options have also absolute prices or only additional prices ?

Best regards
Niels
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 28, 2007, 19:01:40 pm
Hi Barnett

Did you have a look at the price incl. tax allready?
Attributes and custom attributes act different now.
We have to show our prices incl. tax at product level and not only in the cart.

Maybe you  can put a paypall donation link in your personal info, so everybody who like to donate can.

Haven't been able to nail down that one yet but it is on the to-do list.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 28, 2007, 19:02:38 pm
hi,

one more question.

Can options have also absolute prices or only additional prices ?

Best regards
Niels

try doing this =1.00 in the options
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 28, 2007, 19:07:36 pm
Hi, I'm a newbie to joomla and virtue mart. but i installed yr hack.  I'm trying the examples and have put the following into the "custom attribute box"
Code: [Select]
Donation(price)(please enter donation|title-below)(10.00|+);
Reduce By(price)(How much to subtract|title-below)(|-);
name(text)(1.00 per character|title-below)(|1.00|char);
message(textarea)(5.00 per word|title-hover)(message here|5.00|word);
Test(text)(1.50 per character|title-hover)(|1.50|char_nospace-d)

I got this far, but if you look at the website, it is confusing because of the format, notice how the first 2, donation, and subtract, run together.  Also the "checkout" now is in the middle.  http://firzt.com/joomla/index.php?page=shop.product_details&flypage=shop.flypage&product_id=30&category_id=10&manufacturer_id=0&option=com_virtuemart&Itemid=31 (http://firzt.com/joomla/index.php?page=shop.product_details&flypage=shop.flypage&product_id=30&category_id=10&manufacturer_id=0&option=com_virtuemart&Itemid=31)

How can I force everything to be left aligned?   Can I put a horizontal line or something between the different attributes?   How to force the check out now icon to be at the bottom.    Thx    p.s.  I get an error if i put a semi-colon (;) after the last custom attribute.   thx again.

You can put a line using the (line) attribute.  See syntax...

Otherwise you may want to play with your CSS.  Each of your attributes seems to have a wrapper div with the following style applied to it:
Code: [Select]
"width:30%;float:left;text-align:right;margin:3px;"
check your flypage or something to correct it.

you also may try playing with the "label" tag in the css.  But really this issue is not related to this hack.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Marco on May 28, 2007, 19:33:32 pm
Hi, I'm a newbie to joomla and virtue mart. but i installed yr hack.  I'm trying the examples and have put the following into the "custom attribute box"
Code: [Select]
Donation(price)(please enter donation|title-below)(10.00|+);
Reduce By(price)(How much to subtract|title-below)(|-);
name(text)(1.00 per character|title-below)(|1.00|char);
message(textarea)(5.00 per word|title-hover)(message here|5.00|word);
Test(text)(1.50 per character|title-hover)(|1.50|char_nospace-d)

I got this far, but if you look at the website, it is confusing because of the format, notice how the first 2, donation, and subtract, run together.  Also the "checkout" now is in the middle.  http://firzt.com/joomla/index.php?page=shop.product_details&flypage=shop.flypage&product_id=30&category_id=10&manufacturer_id=0&option=com_virtuemart&Itemid=31 (http://firzt.com/joomla/index.php?page=shop.product_details&flypage=shop.flypage&product_id=30&category_id=10&manufacturer_id=0&option=com_virtuemart&Itemid=31)

How can I force everything to be left aligned?   Can I put a horizontal line or something between the different attributes?   How to force the check out now icon to be at the bottom.    Thx    p.s.  I get an error if i put a semi-colon (;) after the last custom attribute.   thx again.

I had the same problem.
Because the add-to-cart quantity box and submitbutton function are placed between <p></p>.
What I did is placing this also in div format.
You can find the add-to-cart function in shop_product_details.php
But other solutions will be around, this worked for me.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 28, 2007, 20:37:26 pm
A bug?

I can't end my list of custom attributes with multiple textareas. If I wish to use more than one, I must end the string with a different attribute, (such as upload) and it then works, for some reason.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 28, 2007, 21:30:15 pm
A bug?

I can't end my list of custom attributes with multiple textareas. If I wish to use more than one, I must end the string with a different attribute, (such as upload) and it then works, for some reason.

hmmm.... I'll look into it.   Does it throw an error?  Does it not load the last textarea? 
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on May 28, 2007, 21:34:36 pm
I have just doubled checked the error, it throws up


Fatal error: Cannot instantiate non-existent class: ps_product_custom_type_textarea in /home/****/public_html/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 68

 Its not an urgent fix - a workaround is to simply change the order - but thought I would mention it
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Foxx on May 29, 2007, 10:38:59 am

Hi,

First of all, thanks for this great hack! Second, no surprise I think, a question..

Is it possible to charge different amounts per character if the height is increasing?
So, for example 30mm Fonts costs $1.00 per character and 40mm costs $1.25 per character and so on.

I went trough the forum, If I overlooked it, I'm sorry.

Regards,
Foxx

Currently the hack does not have the capability for one attribute to change pricing depending on another.  However you might be able to accomplish what you want by having two separate text boxes.... one for 30mm and one for 40mm.  The syntax might look like this:

Engraving Text(line)(enter in the text in the appropriate textbox|field-below)(--------------------------------------------------------------);
30mm Engraving(text)(1.00 per character|field-below)(|1.00|char);
40mm Engraving(text)(1.25 per character|field-below)(|1.25|char);

maybe that would work for you.
-barnett


Hi Barnett,

Is it possible for you to implement this feature?

Regards,
Foxx
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 29, 2007, 16:25:31 pm

Hi Barnett,

Is it possible for you to implement this feature?

Regards,
Foxx

Yes I hope to implement this feature down the road when more ajax is introduced to the hack... but it is not a simple update currently.  So it may be a few months away.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Ron on May 31, 2007, 10:52:28 am
O.k. For me, the value of this hack is the color options. It's great for that. But what I need for many clients (clothing shops, paint shops, and many others) is similar to the RGBswatch modification described earlier in these posts, but using actual images of colors which can be clicked to perform the selection. So when someone clicks "select color" it pops up a window with several choices which allow a shopper to select a color  - not from an RGB listing, but from several small color jpg or gif files as is available now right in the page (no checkbox or radio buttons needed as in the RGB color swatch thing). Many times there are patterns involved so images are necessary. The reason a pop-up is necessary is that there may be 100 color options or more AND if the attributes can be tied to it, then the same pop-up grouping of colors can be re-assigned to several products, that would be even MORE ideal than having to cut and paste the entire attribute listing into all the items that might need it. Keep in mind someone might need more than one pop-up, as in one with 50 colors to be available for one item that only comes in 50 colors and one with a different 50 colors available for other items that are available in other colors. I would be glad to donate something to promote development for a back end administration add-on where a user could upload ALL their colors and label them, then from those available, add certain colors from the existing color pool to a  group A, and different colors to another group.B or group C.. which could then be assigned to any product by simply selecting color group A, B, C, etc... through a GUI.

Thanks in advance if you or anyone can help with this little trick as it would be useful for every online shop I have ever done! Am I completely insane for thinking this should be part of all carts? LOL

see it being done somehow here (item already selected - click view colours available): http://www.farrow-ball.com/categorylist.aspx?cid=PFIE&language=en-GB 
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on May 31, 2007, 17:21:41 pm
@ Ron

Good ideas.  I'll keep this in mind for further improvements, however it may come with a later release when there is greater backend control.  The link you supplied help me see what you mean.

To be honest I don't know what all the different shopping cart needs are out there as there are tons of different businesses.  But posting here really helps.  Thanks.

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: lkow77 on June 03, 2007, 20:53:08 pm
Hi;
very usefull hack.
How should I write formula, to have:
1/ checkbox with price with tax and next checkbox if sb checking first checkbox and textarea to writting if sb mark checkbox first and second?

sorry for my English ;-)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: huub on June 04, 2007, 11:57:18 am
Hi,

I have implemented the custom attrib. hack and it works great, but now I also wanted to install the child list hack and noticed it also makes changes to ps_product.php. Since I don't want to loose the custom attrib. features can you tell me what is the easiest/best way to implement this hack so that I can use both the custom attrib. hack and the child list hack.

Thanks in advance.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Brooker on June 04, 2007, 12:56:11 pm
hi, how do i implement this:
Code: [Select]
Gender(radio-r)(|)(Male,Female)It keeps asking for a product variant. When i have it as (radio) and not as required then it lets me go on to the next page but it doesnt have the radio button i checked...
when i have it as:
Code: [Select]
Gender(radio-r)(|)(Male []|,Female []|)it works but it comes up in the form as:
Code: [Select]
Gender: Male [ Female [is this a bug or was the hack not designed for this type of implementation?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 04, 2007, 16:49:20 pm
hi, how do i implement this:
Code: [Select]
Gender(radio-r)(|)(Male,Female)It keeps asking for a product variant. When i have it as (radio) and not as required then it lets me go on to the next page but it doesnt have the radio button i checked...
when i have it as:
Code: [Select]
Gender(radio-r)(|)(Male []|,Female []|)it works but it comes up in the form as:
Code: [Select]
Gender: Male [ Female [is this a bug or was the hack not designed for this type of implementation?

I'll check into it further but you could try having one pre-selected:

Gender(radio)(|)(Male*,Female)

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on June 05, 2007, 01:45:28 am
Hi, I couple of things I'v noticed. Both easily overcome,  but perhaps someone might benifit...

File upload doesn't support filename spaces (common for .doc in my village) for instance "file name.doc" throws up an error.

I mentioned previously about multiple text boxes, but it seems you can't end with a single textarea either, or you get non-existant class error.


Or perhaps these are issues with my server?


Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: dubey on June 05, 2007, 14:46:48 pm
Also, I have a problem which again might be a server issue, where I get this error

This error (HTTP 406 Not Acceptable) means that Internet Explorer was able to receive information from the website you visited, but the information was not in a format that Internet Explorer can display.

however, if i take either the custom or the stadnard attributes away, the page works fine. It doesn't seem to matter which I remove.




it seems this is a server error, here is the log

mod_security: Access denied with code 406. Error processing request body: Multipart: invalid part header (missing colon): ISBN"\\r\\n [severity "EMERGENCY"]

This is not a fault in the attribute code, as it works fine if I remove all the custom attributes?

****

update is you need to disable mod_security for this to work.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: mikemotorcade on June 15, 2007, 00:14:12 am
Great Hack!!!

I have a question.

Attached is a screenshot of what I bwant to be able to do. Is it possible? Here is the attribute code I used:

Code: [Select]
Wood(radio-r)(Type of wood|title-hover)(Solid Oak|images/img_1.jpg,Solid Walnut|images/img_2.jpg,Rosewood|images/img_3.jpg);Laser Engraving(select-r)(Custom Laser Engraving|title-hover)(None,Name/Dates[+40.00],Name/Dates/Art[+50.00]);Font(select)(What font do you want?|title-hover)(Times New Roman|images/tnr.jpg,Times New Roman Italic,AvantGarde,MurrayHill,ParkAvenue,Snell,ZapfChan);Layout(select)(Engraved on the top or on the front?|title-hover)(Engraved on Top of urn,Engraved on Front of urn);Engrave(textarea)(Text to engrave|title-hover)(||);Artwork(select)(Artwork|title-hover)(None,Rose,Cross,Tree,Custom);Custom Artwork(file)(upload file of type .jpg, .gif, .png, .bmp|title-hover)(images/|.jpg,.gif,.png,.bmp)
Thank you!

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 15, 2007, 14:23:13 pm
Great Hack!!!

I have a question.

Attached is a screenshot of what I bwant to be able to do. Is it possible? Here is the attribute code I used:

Code: [Select]
Wood(radio-r)(Type of wood|title-hover)(Solid Oak|images/img_1.jpg,Solid Walnut|images/img_2.jpg,Rosewood|images/img_3.jpg);Laser Engraving(select-r)(Custom Laser Engraving|title-hover)(None,Name/Dates[+40.00],Name/Dates/Art[+50.00]);Font(select)(What font do you want?|title-hover)(Times New Roman|images/tnr.jpg,Times New Roman Italic,AvantGarde,MurrayHill,ParkAvenue,Snell,ZapfChan);Layout(select)(Engraved on the top or on the front?|title-hover)(Engraved on Top of urn,Engraved on Front of urn);Engrave(textarea)(Text to engrave|title-hover)(||);Artwork(select)(Artwork|title-hover)(None,Rose,Cross,Tree,Custom);Custom Artwork(file)(upload file of type .jpg, .gif, .png, .bmp|title-hover)(images/|.jpg,.gif,.png,.bmp)
Thank you!

Right now the hack does not have an ability to have attributes "activate" or deactivate" other attributes.  This would require some ajax/javascript but I do hope to accomplish something like this in later versions of this hack.  Thanks for the image.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: sebb on June 18, 2007, 11:32:08 am
Hi!

I have a question about the attribute data "text & textarea" : it is possible to limit character ?
Thank you and sorry for my english.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 18, 2007, 15:00:24 pm
Hi!

I have a question about the attribute data "text & textarea" : it is possible to limit character ?
Thank you and sorry for my english.

Currently the hack does not have a character limit for text or textarea.  Hopefully in the next release or so it will.

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: sebb on June 18, 2007, 16:29:19 pm
Quote
Hopefully in the next release or so it will.

Do you know when the next release will be come ?  :P
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 18, 2007, 20:27:12 pm
Quote
Hopefully in the next release or so it will.

Do you know when the next release will be come ?  :P

Most likely late summer... until then there will only be slight modifications.

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: sebb on June 19, 2007, 11:35:07 am
Thanks for your answer.

So y have an other question:
I write this line in my attributes:
Quote
Composition(select)(|)(One*, Two [-10]€, Three [=38]€);
1) I ask -10€ but in my website, it add the tax, so, how can I do to it don't add the tax. Because, in my selectlist, it is writting "Two -10€" but if I choose this, it subtract 10€ + my tax.
2) In my third proposition, there is the same problem : the new price is not 38€ but 38€ + my tax. AND, In my slectlist, it is writting "+38" but not "=38" ?

Thank you.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: katai on June 19, 2007, 13:35:43 pm
Before i try it, can somebody tell me, if i heave 2 custom attributes (all the same tipe, text), if nothing is typed, they will apear listed in the basket,order email, etc...?
I am trying for days to solve it. (if nothing is typed, do not show in the basket the attribute title..)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 19, 2007, 15:40:34 pm
Before i try it, can somebody tell me, if i heave 2 custom attributes (all the same tipe, text), if nothing is typed, they will apear listed in the basket,order email, etc...?
I am trying for days to solve it. (if nothing is typed, do not show in the basket the attribute title..)

with this hack you could potentially put a space as the default text and I think that would make it appear in the basket even if nothing is typed.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: katai on June 19, 2007, 17:01:39 pm
I expressed myself incorectly (my english is poor).
The thing i want: if nothing is typed in the textbox, it shoudn`t apear in the basket, email notification, etc.... NOT EVEN THE TITLE
Thanks for your reply.
I think i will try, and see :)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: sebb on June 20, 2007, 16:35:01 pm
Sorry, but i have the same problem :

I write this line in my attributes:
Quote
Composition(select)(|)(One*, Two [-10]€, Three [=38]€);
1) I ask -10€ but in my website, it add the tax, so, how can I do to it don't add the tax. Because, in my selectlist, it is writting "Two -10€" but if I choose this, it subtract 10€ + my tax.
2) In my third proposition, there is the same problem : the new price is not 38€ but 38€ + my tax.

Thank you.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 20, 2007, 17:34:16 pm
Sorry, but i have the same problem :

I write this line in my attributes:
Quote
Composition(select)(|)(One*, Two [-10]€, Three [=38]€);
1) I ask -10€ but in my website, it add the tax, so, how can I do to it don't add the tax. Because, in my selectlist, it is writting "Two -10€" but if I choose this, it subtract 10€ + my tax.
2) In my third proposition, there is the same problem : the new price is not 38€ but 38€ + my tax.

Thank you.

I think the regular attributes work the same way.  This is a VM issue but I may try to tackle it in future releases.
-Ted
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Marco on June 20, 2007, 18:27:18 pm
No, in the regular attributes prices are shown including tax.
That's what I mentioned a few messages before, there is a difference how the regular and the custum attributes prices are shown.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 20, 2007, 21:58:36 pm
No, in the regular attributes prices are shown including tax.
That's what I mentioned a few messages before, there is a difference how the regular and the custum attributes prices are shown.

Ok noted.  I'll work on a fix for this.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: William Dooley on June 21, 2007, 22:08:33 pm
Would there be a way to use this mod to make it take all of the options and present a product? Basically we have base model products, then products with different options, but each configuration is it's own product. So take for example you have an 8 inch tank that the base model is in stainless steel. That product is 83QSS, that is the 8 inch 3 quarter inch stainless steel tank. We also have the tank in plastic, or in 1 inch. Those would be 83QPL and 81SS respectively. Each one is it's own product though. So is there any way to use this mod you have created, and when they choose their options, have it serve up the flypage for that model?

Thank you,
David Henderson
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Daz on June 29, 2007, 16:06:31 pm
Hi Barnett,
Have been following this thread with interest.
My situation:
I've setup a product to take event bookings for adults and children with configured product price for 1 adult. Using the 'number' custom attribute, if user specifies 2 adults, of course it adds the price to the configured product amount.

I need this figure to be the total cost for 2 adults rather than the attribute cost plus the default product cost. I dont suppose there is a way around this without setting the product cost to zero is there?

Thanks,
DazP   
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on June 30, 2007, 23:17:34 pm
Hi Barnett,
Have been following this thread with interest.
My situation:
I've setup a product to take event bookings for adults and children with configured product price for 1 adult. Using the 'number' custom attribute, if user specifies 2 adults, of course it adds the price to the configured product amount.

I need this figure to be the total cost for 2 adults rather than the attribute cost plus the default product cost. I dont suppose there is a way around this without setting the product cost to zero is there?

Thanks,
DazP   

I'm not sure why you would do it this way rather than just make 2 products called "child ticket" & "adult ticket" where the user just enters the quantity....

If you are wanting all the tickets on one product page then you will have to start the product at zero...  hope that helps

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: youngmoneyblog on July 01, 2007, 06:35:18 am
wil this work with VM 1.0.12?

UPDATE: It does not work with VM 1.0.12. The replacement code is different.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on July 02, 2007, 13:13:59 pm
wil this work with VM 1.0.12?

UPDATE: It does not work with VM 1.0.12. The replacement code is different.

I'll be working on an upgrade shortly.
-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Daz on July 02, 2007, 14:13:49 pm
OK thank Barnett.

Another QQ> Can you tell me what file (css?) is causing the input boxes to have a 60% div? I need to change this width.

Thanks again,
DazP
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Daz on July 03, 2007, 11:53:22 am
Quote
I'm not sure why you would do it this way rather than just make 2 products called "child ticket" & "adult ticket" where the user just enters the quantity....

If you are wanting all the tickets on one product page then you will have to start the product at zero...  hope that helps

-barnett
the problem is that if an adult wants to buy tickets for his younger and older children as well as him and his wife that would entail 3 different transactions for him, but if I put a notice up to say that the quantity field is the cost of the first adult ticket that would kind of work...

My biggest problem now however is the layout. I can't get the fields to line up in all browser widths but its the custom attribute fields that seem to be wrapped in a 60% width div tag when it only needs to be around 50 px. Apologies for mentioning this twice.

Thanks,
DazP
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on July 03, 2007, 13:29:47 pm
the problem is that if an adult wants to buy tickets for his younger and older children as well as him and his wife that would entail 3 different transactions for him, but if I put a notice up to say that the quantity field is the cost of the first adult ticket that would kind of work...

My biggest problem now however is the layout. I can't get the fields to line up in all browser widths but its the custom attribute fields that seem to be wrapped in a 60% width div tag when it only needs to be around 50 px. Apologies for mentioning this twice.

Thanks,
DazP

Adding three products (2 adult tickets, 1 child ticket, 1 older child ticket) to a cart and then checking out is still one transaction in my book.

Layout issues should not be caused by this hack, however I could be wrong.  First check your "flypage" layout file to see if you can correct the issue there.  Otherwise the issues may be in the ps_product_custom_attribute.php file of this hack.

If you could supply a link I could take a look at it. Hope that helps. 

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Daz on July 03, 2007, 17:39:33 pm
I've sussed out the layout issue (for my application at least)

Changing 'label side' widths and 'Input side' widths in the ps_product_custom_attribute.php file and also the addtocart form position in the flypage.php sorted my layout/alignment issues of the custom attributes.

 

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Daz on July 04, 2007, 01:01:27 am
Quote
Layout issues should not be caused by this hack, however I could be wrong.  First check your "flypage" layout file to see if you can correct the issue there.  Otherwise the issues may be in the ps_product_custom_attribute.php file of this hack.

If you could supply a link I could take a look at it. Hope that helps. 

-barnett

Hmm - I've not quite sussed it. I can't find out what is generating the line with the 'quantity' label and 'add to cart' button. It's just not playing ball :-(

Basically I have set the addtocart form inside a table and given it a fixed width. The 'add to cart' button is then wrapping below the quantity' which is aligning to the right but I need the quantity label to appear to the left of the quantity input box.

Take a look here on my dev server: http://backup.bushcraftuk.com/component/page,shop.product_details/flypage,shop.flypage/product_id,48/category_id,6/manufacturer_id,0/option,com_virtuemart/Itemid,107/
 (http://backup.bushcraftuk.com/component/page,shop.product_details/flypage,shop.flypage/product_id,48/category_id,6/manufacturer_id,0/option,com_virtuemart/Itemid,107/)

If you can help me get to the bottom of this That will be fantastic.

EDIT:
I've found the needle in the haystack, (er the file in question)  - shop.product_details.php I'll have a play :)


Thanks,
DazP

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Brooker on July 04, 2007, 01:12:59 am
Barnett,
Im having some coding issues. everytime i put in a checkbox or radio i get a ']' after the text it put in for it.
here are some screen shots which may help...
http://www.christianbrooker.com/firefox.png (http://www.christianbrooker.com/firefox.png)
http://www.christianbrooker.com/safari.png (http://www.christianbrooker.com/safari.png)
here is my code:
Code: [Select]
<b>Membership type</b>(select)(To purchase more than one membership fill in this form for the first member and add it to your cart. Then you can return to the shop and repeat this procedure until you have added all members to your cart.|title-hover)(Full competitor [+160],Family discount 2nd full competitor [+140],Family discount 3rd full competitor [+100],Interclub competitor [+100],Learn to dive 1 year [+50],Learn to dive 12 weeks [+35],Coach [+140],Coach/Diver [+220],Upgrade diver to coach [+60],Upgrade interclub diver to full competitor [+60],Life member coach [+80],Official [+20]);<b>Club</b>(select)(|)(Direct Diving NSW Membership,Abbotsleigh,Hunter United Diving Academy);
<b>Member's Details</b>(checkbox-r)(Check this to declare that these are the details for the registering member and that they have agreed to the <a href=http://www.divingnsw.org.au/index2.php?option=com_virtuemart&page=shop.tos&pop=1&Itemid=100 target=_blank>Terms and Conditions and relavent Code of Conduct and Consent Forms</a>|field-above);
<b>Name</b>(text-r);
<b>Gender</b>(radio-r)(|)(Male []|,Female []|);
<b>Date of Birth</b>(date-r)({yyyy-mm-dd} Click on the box and a calendar will appear. Remember to choose the correct year!|title-hover);
<b>Mailing Address</b>(textarea-r);
<b>Home Phone</b>(text);
<b>Work Phone</b>(text);
<b>Mobile Phone</b>(text);
<b>E-Mail</b>(text-r);
<b>Nominated Official</b>(text)(If you are unsure of this leave it blank.|title-hover);
<b>Volunteer</b>(checkbox)(I and/or my parents would like to volunteer to help Diving NSW from time to time.|title-hover)(Yes []);
<b>Ethnicity</b>(text);
<b>Member or Parent's Occupation</b>(text)
cheers mate!
christian
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on July 04, 2007, 17:51:12 pm
@ christian

instead of this:
Code: [Select]
<b>Volunteer</b>(checkbox)(I and/or my parents would like to volunteer to help Diving NSW from time to time.|title-hover)(Yes []);

try this:
Code: [Select]
Volunteer(checkbox)(I and/or my parents would like to volunteer to help Diving NSW from time to time.|title-hover)(Yes);

Also I would NOT recommend putting the <b> tag in your titles, but rather use css to customize the look of your custom attribute titles.  try adding this to your css:

#addtocart label {
    font-weight: bold;
}

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Christian Brooker on July 04, 2007, 22:31:07 pm
sweet man thanks!
also, how do i make the custom attributes box in the backend bigger so i can see all that i have written on say 15 lines instead of 2-3 or whatever it is set at?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Jeff on July 04, 2007, 23:32:36 pm
I am getting the following error when uploading a .jpg image at http://www.newvisioncolorlab.com:8080/index.php?page=shop.browse&category_id=1&option=com_virtuemart&Itemid=1




Error: File Type of file w5.jpg is not Supported

Any clues?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Jeff on July 07, 2007, 15:55:58 pm
Any chances of adding some sort of progress bar to the upload attribute? Also, how about a JAVA applet to upload mutilple files in one shot? Please let me know how possible and turnaround on something like this.

Jeff
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: cyngus on July 09, 2007, 08:48:45 am
is there a way to adjust the actual form feild or pull down feilds width? i've been reading the above statements and comments but im not getting the results i need.. if you check this link
http://www.sheetmetalpro.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=4&category_id=5&manufacturer_id=0&option=com_virtuemart&Itemid=1

you'll see how all the feilds are just kinda oddly shaped according to the options in the feild pull downs... is there some type of css or what not i can add/change to make these feilds equal length? does that make much sense?

thanks
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: ron on July 10, 2007, 12:01:44 pm
great add for the vm features! this one get an A++ from me any i suspect many other vm users! thanks alot!

any word on what problems this will give for the newest release of vm 1.0.12?

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Mark on July 10, 2007, 23:10:31 pm
Very impressive hack. I would like to use it myself, but when I try one of your syntax I get an error:

Fatal error: Class 'ps_product_custom_type_' not found in /home/gerts/html/shop.gerts.eu/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 68

What am I doing wrong here

Thanks,

Mark
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: youngmoneyblog on July 12, 2007, 01:35:38 am
is there a way to integrate the minimum quantity hack into this?

the minimum quantity hack is located here:

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=21723.0
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: jacxx on July 13, 2007, 18:45:59 pm
Pls..can u help me..
i need :
Black 200,00 €
Natural Painted 180 €

with checkpoint ..

thx... ;o)
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Phil Edwards on July 31, 2007, 15:14:25 pm
wil this work with VM 1.0.12?

UPDATE: It does not work with VM 1.0.12. The replacement code is different.

I'll be working on an upgrade shortly.
-barnett

Hey there.... i was wondering if there was any update on this hack for version 1.0.12

I think its awesome and would love to use it!
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Marco on July 31, 2007, 16:40:17 pm
I'm using it with VM 1.0.12 and joomla 12
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: cyngus on July 31, 2007, 18:50:44 pm
still no luck on changing the feild width so that they all line up evenly??
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: barnett on July 31, 2007, 20:14:57 pm
Sorry everyone for the delay here.  I've been swamped & on Vacation the last few months.  I hope to get the upgrade out the door sometimes this month.  Thanks

-barnett
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: cyngus on August 02, 2007, 00:56:16 am
i've managed to change the form feild lengths.. just made a new style in the template_css.css file like this

select.inputbox {
width: 120px;
}

for all who were curious =)

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: cyngus on August 02, 2007, 00:57:00 am
now the new question is.. how do i get rid of the little dotted border around the box when i use the "color" attribute
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: mancede on August 05, 2007, 22:56:16 pm
Hello there,

I am searching for an opportunity to change/update the attributes in the basket afterwards. But I don´´t have any idea how to do this.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: mancede on August 08, 2007, 16:50:45 pm
I have a very big problem with this wonderful hack.

I have some attributes (Checkbox) which are optional.
So no selection also should go.

But when I´dont check any box, then I get a message:
Info: To add this product into your cart you have to select a product variant on the details page.

Please help me. I want to make it possible that the checkbox is realy optional.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: David Richmond on August 08, 2007, 17:02:37 pm
I can't stop crying... Buckets of tears.... I'm so happy this is the hack i've been waiting for all my life!!

So happy!!  This needs added to the core functionality of Virtue Mart.  The custom attributes have needed validation for a looooooong time!!!  The date picker is marvelous
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Willem Couwenberg on August 09, 2007, 22:17:14 pm
Hi,
I need to add a lot off custom attributes items to a product, (name, birth date, time, place, city etc) but they mess up with the quantity and the add cart button.

I'm playing with the shop.product.details.php

can I just put a table in this file to get the cart and quantity on the right spot? 

See: http://mypersonalrelationshiphoroscope.com/shop1/index.php?page=shop.product_details&flypage=shop.flypage&product_id=1&category_id=1&manufacturer_id=0&option=com_virtuemart&Itemid=32 (http://mypersonalrelationshiphoroscope.com/shop1/index.php?page=shop.product_details&flypage=shop.flypage&product_id=1&category_id=1&manufacturer_id=0&option=com_virtuemart&Itemid=32)

Thanks
Willem

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: David Richmond on August 10, 2007, 19:16:32 pm
I have already expressed my joy at this hack  ;D But is there a way to pass a parameter in the link of the item and have that parameter populate a custom attribute?

Example:
index.php....option=com_virtuemart&Itemid=104&TournamentID=512

then do a get parameter and stick that into the text box for TournamentID

I looked at the code and its done in a loop to place the attributes I would even be happy with a way to say

index.php....option=com_virtuemart&Itemid=104&CustomAttribute_05=512
and just make sure Tournament ID is the fifth attribute.

Im not a big php coder but can anyone help our point me in the right direction?

Oh! By the way the reason im even wanting to do this is so that i can write a configurator type page which guides the customer to the right product, this way i could use the customer's answers to populate the custom attributes.  Specifically on this project I will be accepting user's date of birth, gender, experience level, and membership numbers and showing them a list box of potential divisions that they can enter for a tournament.  Once they select the ones they want I'd like to just "add it to the cart" and custom attributes seems like the way to go but i want to retain the users answers.

Thanks

David
Title: CustomAttributes + ChildList
Post by: jimspice on August 12, 2007, 00:37:19 am
Has anyone been successful in hacking Custom Attributes together with Child Lists from markcallf.co.uk.  If so, I'd love to take a peek at your ps_product.php and ps_product_attributes.php files.

Jim Spice
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Skye on August 13, 2007, 23:07:59 pm
-->Michael Manski

Could you add an option that is for NO options chosen?  That way you don't have to be leaving it blank - quick fix anyway.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: riesengross on August 14, 2007, 21:08:04 pm
Hello,

it's a great hack, do you have some experience with Joomla 1.0.13?

I need a additional feature and I think a lot of people in this forum, too.

Could you add a possibility to add a additional service fee, that's not related with the amount?

That means for example:

1 piece chocolate 1.20 Euro
Attribute:
Service Fee Gift wrap 3.00 Euro

I'd like to order 6 pieces of chocolate and select the attribute Service Fee Gift Wrap
today: 6 x (1.20 + 3.00) = 28.20 Euro
needed: (6 x 1.20) + 3.00 = 10.20 Euro

Many people need this option, search for
service fee, one off fee, single charge and so on.

Im willing to make a donation, order a book at amazon or send you a beer...

Best regards
Jürgen
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Thomas Kampp on August 14, 2007, 22:33:44 pm
Again Barnett - you are the master...!  ;D 8)

Please tell me if the hack supports this:
Looking at your sample - a user wants to buy 2 circuler saws in two diffrent colors etc. (different information) - is that possible or can the customer only buy one and include the extra information once?

Will the extra information be emailed to the administrator or only shown in backend?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Jeff on August 18, 2007, 16:29:41 pm
I am curious if you could somehow integrate a BULK IMAGE uploader into your hack. I want o call an image uploader so a customer can add hundreds of images to a product. For instance, I have a product that is 4x6 inches. They want to order these 4x6 prints for a wedding proof print job. There may be 200-800 images. I already have an image uploader that is activeX and JAVA autosensing. You can see my temporary band-aid page at http://www.newvisioncolorlab.com/index.php?option=com_wrapper&Itemid=36

Basically, this image uploader is extremely configurable and has an intuitive API (if you know how to use it). Here is the online instructions http://www.aurigma.com/Support/DocViewer/25.aspx

Please let me know if you or someone you know is interested.

Jeff
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Carlton Brooks on August 19, 2007, 02:02:21 am
I have a list of check boxes. Is there anyway to make them in a vertical format, so that after each cookie a page break or line feed is added. So that it looks like the following

BOX Mixed Assortment or
BOX Chocolate Chip
BOX Double Chocolate Chip
etc.....

The code I use is as follows

Code: [Select]
Cookie Options(checkbox)(Choose the type or types that you would like to order)|title-hover)( Mixed Assortment or, Chocolate Chip, Double Chocolate Chip, Peanut Butter, Mexican Wedding, Raisin Oatmeal, Snickerdoodle, Sugar, Butter );Instructions(textarea)(Please let us know of any special packaging directions|title-hover)( |)
Thanks
carltonb
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Wayne on August 27, 2007, 18:28:46 pm
I love this hack but like another poster, am having trouble with it.  I offer a monogram service for some of my products and this needs to be optional.  I would like them to be able to add the product from the Product Category rather than having to view the product details.  With this hack, my customers are forced to add to cart by viewing the product details and then clicking on Add to Cart.  This happens even with defaults set to load in the attrib fields.  Here is the code I am using for the attribs:
Code: [Select]
Monogram Option? (select)(|)(No*,Yes [+3.00]|);
Monogram Text:(text)(|)(None||)
I thought by making each field load a default, it would allow the cart add wherever you choose but you are still forced to view the product.

Also, I have noticed that none of the attributes with the exception of price are actually subtracting anything.  Not sure if this is by design or what. 

Can someone please help with this?  I really need this to work.

Thanks,

Wayne
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: jhdesign on August 27, 2007, 18:35:13 pm
How do I change the date in the Calendar? from y-dd-mm to mm-dd-y?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Wayne on August 30, 2007, 05:47:45 am
I love this hack but like another poster, am having trouble with it.  I offer a monogram service for some of my products and this needs to be optional.  I would like them to be able to add the product from the Product Category rather than having to view the product details.  With this hack, my customers are forced to add to cart by viewing the product details and then clicking on Add to Cart.  This happens even with defaults set to load in the attrib fields.  Here is the code I am using for the attribs:
Code: [Select]
Monogram Option? (select)(|)(No*,Yes [+3.00]|);
Monogram Text:(text)(|)(None||)
I thought by making each field load a default, it would allow the cart add wherever you choose but you are still forced to view the product.

Also, I have noticed that none of the attributes with the exception of price are actually subtracting anything.  Not sure if this is by design or what. 

Can someone please help with this?  I really need this to work.

Thanks,

Wayne
Is there anyone that can help me?  My plight is woeful and I would greatly appreciate some help.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: brigitte on September 05, 2007, 10:05:27 am
Hi everybody,

I'm having the following problem.
I defined a field with type textarea and it is working fine. But... when the text is displayed in the basket, all the <returns> given in in this textfield are replaced bij the two characters rn..

Searched the forum but could not find anything... Any help is much appreciated.

Kind regards
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: standby on September 05, 2007, 21:44:46 pm
Hello,

it's a great hack, do you have some experience with Joomla 1.0.13?

I need a additional feature and I think a lot of people in this forum, too.

Could you add a possibility to add a additional service fee, that's not related with the amount?

That means for example:

1 piece chocolate 1.20 Euro
Attribute:
Service Fee Gift wrap 3.00 Euro

I'd like to order 6 pieces of chocolate and select the attribute Service Fee Gift Wrap
today: 6 x (1.20 + 3.00) = 28.20 Euro
needed: (6 x 1.20) + 3.00 = 10.20 Euro

Many people need this option, search for
service fee, one off fee, single charge and so on.

Im willing to make a donation, order a book at amazon or send you a beer...

Best regards
Jürgen

Hi, I think you can put  the "Service Fee Gift wrap" like a new product.

Product 1: 6x1,2= 7,2 euro
Product 2: Service Fee Gift wrap = 3 euro
Total: 10,2 euro

Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Pirouff on September 06, 2007, 11:49:03 am
Hi, I really like your  Custom Attributes Extended :. But I have two questions :

1) Is there any way the uploaded file to be attached to the order in the backend of VM. I want to add the command ID to the name of the file upload to allow me to connect the file with the order later.
 
Example  :
if the customer order_id is : 12zz, and the customer upload the file picture1.jpg
It will be cool to store and upload the file with the name : 12zz_picture1.jpg instead picture1.jpg to be sure that other customer will not upload the same file picture1.jpg and overwrite the same file later in the same directory

2)
First In all  my forms; the fiels File upload is requiered (with the -r)
 but if there is an error during the upload from my customer (like size > my Max limit) the error message is OK but in any case your update the cart wich is bad for me...i would like this to be process in the same way than a standard validation => staying on the current form, show the error message  and NOT adding the product to the cart.

Thanks a lot for your help
Sorry for my english .

Marc
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Luca on September 06, 2007, 19:59:18 pm
Sorry everyone for the delay here.  I've been swamped & on Vacation the last few months.

Dear Barnett,

I hate to be yet another hack-user that asks you for help but....

I've added your hack to my virtuemart, and now while I can offer the same product in different flavours and customizations, I noticed that the volume-discount stacks!

Example:

Item costs $1 per piece
If customer buys 10 pieces of the same Item, customer should pay only $0.90 per piece.

However, if a customer buys:
5 pieces of Blue Item
5 pieces of Red Item
(thanks to your Hack now I can finally separate them and my customer can write the color he likes)

the program tells him that he buys them at $0.90 per piece, and that's NOT good. He should buy them at $1 each because from my point of view he didn't reach the threshhold of 10 pieces.

So, as you can see, the total number of the pieces - even if they have different customizations - stacks and generates the discount.

Is there a way to solve this?

Thank you Thank you Thank you!
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: mburris on September 07, 2007, 12:01:11 pm
I have no idea what is going on here... i've tried to install this on version 1.10 1.11 and 1.12 each of them gives me an error on load.What version of VM is everyone using?  His latest files provide the same files the instructions say to edit... does this mean you dont have to edit them in the first place???

help
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: sirkan on September 07, 2007, 21:22:59 pm
hi everyone,

thanks for this great hack, it is really usefull ;)

I have a question about attributes and pictures:

i am making a t-shirt shop, i want to know if it is possible to combine 2 picture from 2 different attribute.
ex: the customer choose a t-shirt color (so the picture is "visible") and after he select a logo. Is it possible that the logo picture appears on the t-shirt picture?

sorry for my bad english
thanks,
sirkan little french t-shirt maker !!
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Tommy on September 16, 2007, 19:23:13 pm
Hi everyone & Thanks a lot for the hack

Its works pretty well, but I have only one question :

I use textarea, non mandatory, just for information in my orders

Sometimes, my customers do not fill the area

I just wanna know if its possible to do not display the result in the basket if they are empty
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: jahn on September 16, 2007, 20:45:57 pm
Hello,

i have two questions, the first is work this hack also with virtuemart 1.1svn?
second question is this.

i have a t-shirt shop with different colors as attribute, can i use this attribute names for display color pictures?

greetings kruegge
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Sprouts on September 17, 2007, 16:47:48 pm
- Required fields -

Have I missed something in the patches, or are the required fields only tagged with an asterisk?  When left empty I can continue shopping without any notice or anything.

-Joomla 1.0.13.
-VirtueMart 1.0.12

/M.
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Tommy on September 17, 2007, 18:58:53 pm
I use a old version of the hack
I tride to use the new one, but I think there is a mistake somewhere with the checkbox

I created 3 checkbox with the example, the colors like this :

Colors1(radio)(tip here|title-hover)(Blue [+5.00]|images/img_blue.jpg,Red [+10.00]|images/img_red.jpg);
Colors2(radio)(tip here|title-hover)(Blue [+5.00]|images/img_blue.jpg,Red [+10.00]|images/img_red.jpg);
Colors3(radio)(tip here|title-hover)(Blue [+5.00]|images/img_blue.jpg,Red [+10.00]|images/img_red.jpg);

I just copy the example 3 times, the result in the basket is :

TEST01

Colors1: Red (+ 10.55 €) (+ 10.55 €)
Colors2: Red (+ 10.55 €) (+ 10.55 €)
Colors3: Blue (+ 5.28 €)

When you use only one checkbox, its OK ! but more than one, the price of the option is displayed twice and of course the final price is wrong

Do you have the same problem ?
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: Tommy on September 17, 2007, 19:49:59 pm
Its because the system test also the name of the option
If I configure the product like :

Colors1(radio)(tip here|title-hover)(Blue1 [+5.00]|images/img_blue.jpg,Red1 [+10.00]|images/img_red.jpg);
Colors2(radio)(tip here|title-hover)(Blue2 [+5.00]|images/img_blue.jpg,Red2 [+10.00]|images/img_red.jpg);
Colors3(radio)(tip here|title-hover)(Blue3 [+5.00]|images/img_blue.jpg,Red3 [+10.00]|images/img_red.jpg);

It works

But, in the case of differents options called "yes" or "No", if you have more than one checkbox, its not very nice
Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: hqin on September 18, 2007, 01:22:15 am
hey,is there hack for

-Joomla 1.0.13.
-VirtueMart 1.0.12

thanks


Title: Re: Custom Attributes Extended 2.0 [Hack]
Post by: sirkan on September 18, 2007, 11:37:40 am
hi everyone,

thanks for this great hack, it is really usefull ;)

I have a question about attributes and pictures:

i am making a t-shirt shop, i want to know if it is possible to combine 2 picture from 2 different attribute.
ex: the customer choose a t-shirt color (so the picture is "visible") and after he select a logo. Is it possible that the logo picture appears on the t-shirt picture?

sorry for my bad english
thanks,
sirkan little french t-shirt maker !!

can someone help me with my problem

thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: barnett on September 18, 2007, 23:27:05 pm
Ok Everyone, I finally updated this Hack for Joomla 1.0.13 and Virtuemart 1.0.12.  It should work on older versions of Joomla, but the attached files are only for VM 1.0.12.

I also fixed the added charge feature to reflect taxes properly.

Hope this helps.
-barnett
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Marco on September 19, 2007, 06:46:53 am
Thank you Barrnett!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Marco on September 19, 2007, 07:50:50 am
Hi

I tried the new version, and must say I still use joomla 12 and VM 12.(maybe this is the problem)
Tax in attributes still show price excl. tax.
And I can't upload any file, everytime I do I get an error message.
Please advice.
Title: Some fixes for Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on September 20, 2007, 12:54:42 pm
I noticed that the file upload is very broken. I haven't fully fixed it yet, but here are some other fixes for this release:
Most of these errors only become apparent if the error reporting is set to high.

The error "Undefined index: attr_post_value"  can be fised by changing all lines in ps_product_custom_type.php which say:
if(!$field['attr_post_value'])
to
if(!isset($field['attr_post_value']))

There is an error on line 1687 of the ps_product.php included in the zip file.
$this_value = this_true_value;
must be changed to
$this_value = $this_true_value;

There are lots of problems with non-defined variables and offsets in the file upload and also the file upload part does not set its $charge[] array element.

Hope all this helps.
Title: Losing Attributes problem with Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on September 20, 2007, 13:51:28 pm
I tried the sample attributes for the circular saw (but without the faulty file upload options)
Date(date)(tip here|field-above)(|);
Color Options(checkbox)(another tip|title-hover)(test1 [+10.00]|images/img_1.jpg,test2 [-20.00]|images/img_2.jpg,test3 [-10.00]|images/img_3.jpg,test4 [+30.00]*|images/img_4.jpg,test5 [-5.00]|images/img_5.jpg);
Divide(line)(tip-here|field-below)(<b>---------------------------</b>);
Engrave(text)(3.00 per character|field-below)(name here|3.00|char);
Donation(price-r)(help us out|field-below)(25.00|+);


The output looked like:
Size: XL (+ $1.08)
Power: strong
Date:
Color Options: test4 (+ $32.48)
Engrave: name here (+ $29.23)
Donation: price (+ $27.06)
Subtotal $263.18

(Note that the donation which was 25.00 seems to have increased by 2.06)

But when I go to checkout, it looks like:
Size: XL (+ $1.08)
Power: strong
Date:
Color Options: test4 (+ $32.48)
Engrave: name here
Donation: price
Subtotal $218.15

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jamo on September 20, 2007, 14:56:26 pm
Hi Barnett,

I have just done a fresh install of Joomla 1.0.13 & VM 1.0.12, and uploaded the files but i keep getting this error;

Fatal error: Class 'ps_product_custom_type_' not found in /home/sites/html/xxxxxxx/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 68

many thanks for any help in advance
jamo
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mcchin on September 24, 2007, 16:35:01 pm
Hi Jamo,

I am new to this as well, but I think after you have applied the hack, you have to use their new syntax for custom attributes.
After you applied the hack, if your existings product setup in the backend already contain custom attributes, you have to update them to the new attribute syntax in order to work.

For example, before you have applied the hack, let say you have a product name "ABC" with custom attribute "Phone Number".
So after you have applied the hack, you will see the error, so you have to change your product name "ABC" custom attribute to "Phone Number(text)".

Hope this helps..

Best Regards
Chin
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jamo on September 24, 2007, 19:21:29 pm
Cheers Chin, I should have read the Syntax piece in the first page!!

many thanks for the pointer, works great now :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mcchin on September 25, 2007, 07:48:36 am
You are welcome Jamo.

I have also found out the file upload is not working, as mentioned in some of the posts here in this thread.
I have managed to change the following in "ps_product_custom_type.php"

line 558 & 560

from
Code: [Select]
$html .= "<input class=\"inputbox\" type=\"hidden\" name=\"".$titlevar."\" id=\"".$titlevar."_field\" value=\"\" /><input class=\"inputbox\" type=\"file\" name=\"".$titlevar."\" id=\"".$titlevar."_file\" onclick=\"document.addtocart.encoding = === 'multipart/form-data';\" onchange=\"document.getElementById('".$titlevar."_field').value = document.getElementById('".$titlevar."_file').value;\" size=\"35\" />";

to
Code: [Select]
$html .= "<input class=\"inputbox\" type=\"hidden\" name=\"".$titlevar."\" id=\"".$titlevar."_field\" value=\"\" /><input class=\"inputbox\" type=\"file\" name=\"".$titlevar."\" id=\"".$titlevar."_file\" onclick=\"document.addtocart.encoding = 'multipart/form-data';\" onchange=\"document.getElementById('".$titlevar."_field').value = document.getElementById('".$titlevar."_file').value;\" size=\"35\" />";
Note that is the problem with Javascript "onclick=\"document.addtocart.encoding = === 'multipart/form-data';\" " . Just take out the extra "===" from both line 558 & 560.

After changing it, file uploading is working for me, hopefully this will help anyone who wants to use file uploading features as well.

I also want to thanks barnett for this cool thing!! This is a great contribution!

Best Regards
Chin
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: silverbow on September 27, 2007, 03:12:28 am
now the new question is.. how do i get rid of the little dotted border around the box when i use the "color" attribute

Did you ever find out how to get rid of that dotted border around the custom attributes?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: juliegrace on October 01, 2007, 00:32:11 am
Hi

I am very new to the virtuemart system (well to ecommerce in general) and when I found this mod it was perfect for my store. 
I seem to have a problem with my systm after completing the Mod and have this error appear

"Parse error: syntax error, unexpected '*', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/bellepur/public_html/administrator/components/com_virtuemart/classes/ps_product_attribute.php on line 348"

Which gives me the impression I have made a mistake somewhere on line 348?

I was very silly and didnt back-up ( my fault I didnt even realise I could).

If anyone could help, I am not sure how to fix this?

Thanks!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Mark on October 01, 2007, 22:00:47 pm
You can just replace the files you have changed with the ones in the installation files.
In the beginning of this thread you find a zip file. Just place those files on your website with the ones you find in the zipfile.
Then you will have no problems.

Hope that works.

Mark
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: luxactor on October 02, 2007, 17:00:52 pm
Any solution for a "price refresh/update" button for attributes? I'm looking so long for this feature now... hope someone have a idea. :(

http://forum.virtuemart.net/index.php?topic=29868.0

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: richie2006 on October 03, 2007, 12:17:42 pm
Hello

Does anyone know for the "Text attribute"  where in this hack can i limit a person text input.  I found this <input type="text" maxlength="20">  But i do not know where to add this in the various file hacks.

Thank you for helping
Richie

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 03, 2007, 12:33:54 pm
The text attribute pricing is one of the ones that doesn't work. See my earlier post.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: richie2006 on October 03, 2007, 12:42:39 pm
Oh all i am needing is someone orders an item - a greeting card, for example.  I just need a text input box to accept their message for the card. And that would be stored with their order.   

My fear is that if i leave that text field wide open - some ya-hooo - who just wants to try to break things - submits a fake order, which becomes pending that has zillions text in the text attribute field - and that gets added to the database. Not good at all.

I hope i am stating this more clear?
Thank you
Richie
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 03, 2007, 12:58:27 pm
As long as you're not charging for the text it will work.

I'll take a look and let you know where to put it.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: richie2006 on October 03, 2007, 13:10:28 pm
Thank you - Thats right i am not charging - i just need to have their text. Like  "poem Title" field and a content field.  That would just get passed with the order.

I was hoping that the input area could look like a memo field instead of a single line box that they keep typing - its hard for them to see what they typed and to edit same.

Anyway - no charging - just need it to pass with the order so that it will show in their order details :-)

Thank you
Richie
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 03, 2007, 13:32:12 pm
Quote
I was hoping that the input area could look like a memo field

ahh, there you have a problem as you will have to use javascript to limit the amount of characters entred in one of those.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: juliegrace on October 08, 2007, 10:33:59 am
This error comes up each time someone attempts to add a product to cart-

"Fatal error: Cannot instantiate non-existent class: ps_product_custom_type_first colour,crystal,black diamond,light azore,aquamarine,light sapphire,indian sapphire,sapphire,capri blue,montanna,chrysolite,peridot,enrite,indicolite,blue zircon,emerald,jonquil,light topaz,khaki,olivine,fire opal,padparadshka,hyacinth,indian red,light siam,siam,ruby,garnet,burgundy,silk,light peach,light colorado topaz,topaz,light smoked topaz,smoked topaz,smokey quartz,light rose,fuschia,amethyst,light amethyst,violet,tanzanite,purple velvet,white opal,pacific opal, carribean blue opal,violet opal,white alabastor,jet,turquoise,rose alabastor,golden shadow,silver shadow in /home/bellepur/public_html/administrator/components/com_virtuemart/classes/ps_product_attribute.php on line 415"

I am very new to VM and learning as I go.  I attempted to use the Hack for the attributes but was unable to get it to work as I am very unsure of dealing with anything to do with codes etc?

I have different types of attributes for products but any type of attribute causes this error?

When you attempt to return to the website after this error the backdrop comes back but no part of VM or Joomla are visable and the only way you can get that back is to close all windows and re-open?

I am sure this is something simple to solve this.. well I hope so?

Please view website if you please.. www.belleandpurla.com.au

Thank you in advance!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Mark on October 10, 2007, 19:10:55 pm
This error comes up each time someone attempts to add a product to cart-

"Fatal error: Cannot instantiate non-existent class: ps_product_custom_type_first colour,crystal,black diamond,light azore,aquamarine,light sapphire,indian sapphire,sapphire,capri blue,montanna,chrysolite,peridot,enrite,indicolite,blue zircon,emerald,jonquil,light topaz,khaki,olivine,fire opal,padparadshka,hyacinth,indian red,light siam,siam,ruby,garnet,burgundy,silk,light peach,light colorado topaz,topaz,light smoked topaz,smoked topaz,smokey quartz,light rose,fuschia,amethyst,light amethyst,violet,tanzanite,purple velvet,white opal,pacific opal, carribean blue opal,violet opal,white alabastor,jet,turquoise,rose alabastor,golden shadow,silver shadow in /home/bellepur/public_html/administrator/components/com_virtuemart/classes/ps_product_attribute.php on line 415"

I am very new to VM and learning as I go.  I attempted to use the Hack for the attributes but was unable to get it to work as I am very unsure of dealing with anything to do with codes etc?

I have different types of attributes for products but any type of attribute causes this error?

When you attempt to return to the website after this error the backdrop comes back but no part of VM or Joomla are visable and the only way you can get that back is to close all windows and re-open?

I am sure this is something simple to solve this.. well I hope so?

Please view website if you please.. www.belleandpurla.com.au

Thank you in advance!

I am sorry. But I tried to add an item in the basket and I didn't get any error? Is there a specific item that is causing this?

Thanks,

Mark
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on October 11, 2007, 21:52:52 pm
I am having a problem with this hack, was wondering if anyone could help. I installed it so I could have a file upload section. However, I want the uploads to be optional to the customer, but if left blank and then you decide to add the product to your cart, it tells the user still that you need to add a product variant. It seems you HAVE to upload a file. Is there a way of making this optional to be able continue to checkout?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on October 14, 2007, 15:53:38 pm
Hello anyone? I am really stuck and if someone would help it'd be greatly appreciated. The two major problems I am facing with this fabulous hack are:

1) keeping upload fields optional. I have read that this was fixed with new version of the hack and it's been mentioned on this thread, but so I need to do anything? Because I've dropped the new php files into the classes folder as per instructions and still states it requires a product variant.

2) Also, my file uploads aren't working or creating a new directory, even though it does not display an error message. I've seen a few different posts with extra code but wondering where it came from? Is there another fix yet for file uploads that I've missed? I have all correct permissions.

Thanks a lot.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Mark on October 16, 2007, 19:12:03 pm
When I receive my orders I see that there is an extra ) added to the text at the end of the custom attributes? Where can I remove that?

I don't see it in the emails send to the customers or in the order view on the site. I see it only in the mails send to shop owner.

Thanks,

Mark
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Mark on October 16, 2007, 19:23:09 pm
Hello anyone? I am really stuck and if someone would help it'd be greatly appreciated. The two major problems I am facing with this fabulous hack are:

1) keeping upload fields optional. I have read that this was fixed with new version of the hack and it's been mentioned on this thread, but so I need to do anything? Because I've dropped the new php files into the classes folder as per instructions and still states it requires a product variant.

2) Also, my file uploads aren't working or creating a new directory, even though it does not display an error message. I've seen a few different posts with extra code but wondering where it came from? Is there another fix yet for file uploads that I've missed? I have all correct permissions.

Thanks a lot.

Hello dilby,

1) What kind of code are you using? I don't have this kind of problem. Maybe you use the wrong syntax.

2) Do you have the debug of Joomla turned on? And of Virtuemart. Maybe you see an error there?

Mark
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: VMit on October 16, 2007, 23:26:19 pm
Could anyone post a link to the good demo of the hack?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 16, 2007, 23:32:07 pm
Well, I guess it depends on what you consider good, but I did the decorations chooser using it:

http://www.inyourfaceapparel.com/component/option,com_virtuemart/page,shop.browse/category_id,6/Itemid,170/vmcchk,1/
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on October 18, 2007, 15:27:37 pm
I am trying to build a donation site, In most cases the base cost is 0 (which I don't want shown). I have an attribute of Donation(price). I enter the details of the donation and see in the shopping cart a price of $10. I do a checkout and the price comes back 0.  I am on VM 1.0.2 with the latest hack code. If anybody has any ideas of making it look more like a contribution site then a site please let me know. I don't want tax to appear and make the invoice look more like a receipt.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 18, 2007, 17:03:39 pm
I am trying to build a donation site, In most cases the base cost is 0 (which I don't want shown). I have an attribute of Donation(price). I enter the details of the donation and see in the shopping cart a price of $10. I do a checkout and the price comes back 0.  I am on VM 1.0.2 with the latest hack code. If anybody has any ideas of making it look more like a contribution site then a site please let me know. I don't want tax to appear and make the invoice look more like a receipt.

I reported this back at Reply #188 about a month ago.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on October 18, 2007, 22:30:36 pm

I reported this back at Reply #188 about a month ago.

Any work around?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: riscphree on October 18, 2007, 22:41:24 pm
Has anyone been able to do this?

I'm using this for a fabric shop, but it isn't working correctly. What I've done is add a select box with Add more, and a select box to subtract length. here is a screenshot.
(http://riscit.info/sewing1.PNG)

I order 12 and 3/4 yards of fabric. Total should be $126.86 ((12 yards * $9.95) + $7.46) as shown below

(http://riscit.info/sewing2.PNG)

But as you can see what its doing, is taking the price of one yard and adding the 3/4 to it and multiplying that times the price, which is not what I want to do.

Any way to fix these prices?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Mazzy on October 19, 2007, 04:10:31 am
I can't seen to get this hack to work with VM 0.13 and the other hack that allows child list item stuff.
Is this a known problem for this hack? Or does this hack just not work with VM 0.13?

Bascially I just need the product attribute list to not display Like this:
Drop Down Box | Drop Down Box | Drop Down Box
all to the right like that breaking the page.
I need it to list like this
Drop Down Box
Drop Down Box
Drop Down Box

is this possible without adding this hack?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on October 19, 2007, 16:25:44 pm
Hello anyone? I am really stuck and if someone would help it'd be greatly appreciated. The two major problems I am facing with this fabulous hack are:

1) keeping upload fields optional. I have read that this was fixed with new version of the hack and it's been mentioned on this thread, but so I need to do anything? Because I've dropped the new php files into the classes folder as per instructions and still states it requires a product variant.

2) Also, my file uploads aren't working or creating a new directory, even though it does not display an error message. I've seen a few different posts with extra code but wondering where it came from? Is there another fix yet for file uploads that I've missed? I have all correct permissions.

Thanks a lot.

Hello dilby,

1) What kind of code are you using? I don't have this kind of problem. Maybe you use the wrong syntax.

2) Do you have the debug of Joomla turned on? And of Virtuemart. Maybe you see an error there?

Mark

Hi Mark. I have turned off debugging. With it on I get all sorts of error messages. I managed to get the upload working - don't know what I did though. But I still don't know how to make file uploads optional. It always requires an upload. In terms of syntax, I just uploaded the files that were available at the start of thread - I haven't manually changed anything.

Ta for the hand.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: riscphree on October 19, 2007, 22:56:42 pm
Has anyone been able to fix this little bug I'm encoutering?

For example, right now if you want 12 and 1/2 yards of fabric and one yard of fabric is $1, it'll take 12.5 times $1 instead what what it should be doing, which is 12 times $1 + $0.50 for the half yard
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: charobnjak on October 20, 2007, 21:26:27 pm
Hi,all
I can't get the images to show up, checked everything twice and still nothing

I use the same code on  the first page
Code: [Select]
Color Options(checkbox)(another tip|title-hover)(test1 [+10.00]|/images/font/arial.gif,test2[-20.00]|/images/font/arial.gif[-10.00]|/images/font/arial.gif,test4 [+30.00]*|/images/font/times.gif,test5 [-5.00]|/images/font/arial.gif)
and this i is what I get

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: arttoart on October 21, 2007, 19:27:23 pm
Dear Captain Paralytic,

Can you gime me a clou how to make the beautiful decoration chooser.
I'am looking for a very long time for somting like that.

We sell Canvas prints and want to use the chooser you made for choosing sorts of technieks lika popart, artwork etc.

Is there someone else who know of it is posible in VM to upload a picture and let it see directly to the user who uploaded it??

Whoud be very happy if someone can help me with the second question.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: huub on October 23, 2007, 11:53:44 am
I have the exact same wish :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 23, 2007, 12:14:17 pm
Dear Captain Paralytic,

Can you gime me a clou how to make the beautiful decoration chooser.
I'am looking for a very long time for somting like that.
It wasn't terribly straight forward so it'll take me a little while to write up.
Title: Re: Custom Attributes Extended 2.1 [Hack] and Virtuemart 1.0.13a
Post by: riesengross on October 23, 2007, 16:00:01 pm
Has anybody tested virtuemart 1.0.13a and Custom Attributes Extended 2.1 work together? Or have we to wait for a new version?
Title: Re: Custom Attributes Extended 2.1 [Hack] for Virtuemart 1.0.13a
Post by: riesengross on October 23, 2007, 16:27:05 pm
I inserted the modifications in

administrator/components/com_virtuemart/classes/

ps_product.php
ps_product_attribute.php

for Virtuemart 1.0.13a.

It seems all is running o.k. - I attache you my modificated files without a garantuee.
Backup your files and then copy the attached one to your installation.

Good luck!

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: arttoart on October 23, 2007, 19:20:20 pm

It wasn't terribly straight forward so it'll take me a little while to write up.
[/quote]

Thx for your anwser

no problem, take your time. i'm  looking for it for a long time so a few days can't be a problem
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on October 24, 2007, 08:04:44 am
Hi,

After I upgraded to Joomla 1.0.13 and Virtuemart 1.0.12, and the new CAE 2.1 hack our shop hasn't been collecting the engraving prices.

When a customer selects a product and type in the engraving, then the correct amount is added. But when the customer then clicks on checkout the engraving amount is stripped from the products price?!?

Has anybody else noticed this problem?

EDIT:

I just realized that the problem is even more spookey!  ???

If I click on another product, type in the engraving and press buy. Then _all_ the engraving amounts are added again? But when I click checkout they are all removed again.

/cbach
Title: Re: Custom Attributes Extended 2.1 [Hack] - Currency Symbols in product detail
Post by: riesengross on October 24, 2007, 10:23:48 am
All works fine, but I need currency symbols after the extended attributes in the product details page. Can anybody help?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 24, 2007, 10:53:30 am
If I click on another product, type in the engraving and press buy. Then _all_ the engraving amounts are added again? But when I click checkout they are all removed again.

I reported this about a month ago!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on October 24, 2007, 11:01:35 am
If I click on another product, type in the engraving and press buy. Then _all_ the engraving amounts are added again? But when I click checkout they are all removed again.

I reported this about a month ago!

Sorry for the double post!  ;)

I can't seem to find any solution for it in this thread, did you get your problem solved?

/cbach
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 24, 2007, 11:26:20 am

I can't seem to find any solution for it in this thread, did you get your problem solved?

/cbach

No, I found another (rather convoluted) method of doing it. When I have time I'll have to check it out properly
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on October 24, 2007, 11:35:28 am

I can't seem to find any solution for it in this thread, did you get your problem solved?

/cbach

No, I found another (rather convoluted) method of doing it. When I have time I'll have to check it out properly

Sounds interesting.

Please let me know if I can help or test anything in any way. We are really loosing alot of money on our shop due to this "bug".  :-[

/cbach
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on October 26, 2007, 00:05:47 am
I have been working on this problem for the last week  ???

I have a product with a price of 0 and an attribute Donations(price)  When I add it to the cart the donation is the price, which is correct. If I do an update on the cart or checkout the price becomes 0.  I hit the problem on 1.0.12 and then upgraded 1.0.13a. I am attaching the debug reports.

This problem seems very solid, One other member of this group is also seeing it. I am wondering why only the 2 of us are having the problem.

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on October 26, 2007, 10:23:28 am
[This problem seems very solid, One other member of this group is also seeing it. I am wondering why only the 2 of us are having the problem.
As I keep on pointing out,  I reported this over a mobnth ago. It is not just 2 of you that are having theproblem. It will be everyone using thishack.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on October 26, 2007, 16:55:00 pm
[This problem seems very solid, One other member of this group is also seeing it. I am wondering why only the 2 of us are having the problem.
As I keep on pointing out,  I reported this over a month ago. It is not just 2 of you that are having the problem. It will be everyone using this hack.

Yes, I looked at some of the recent posts and realized more then 2 have identified this problem. One person is reporting they are losing  money on their live site. This is a very severe problem, the bad news is it takes people time to realize they have a problem as once a site is built and you install a fix you may not rerun all the tests and  notice the problem.

I am wondering where the developer of the hack is and his plan to resolve it.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: VMit on October 26, 2007, 23:47:52 pm
Quote
Could anyone post a link to the good demo of the hack?
Quote
Well, I guess it depends on what you consider good, but I did the decorations chooser using it:
Well done, good hack demo, thank you. Just what should be done in some cases.
One suggestion. Tabs could be used, i think sometimes (scroll or tabs - user select).
Very illustrative example of the idea, thanks.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on October 28, 2007, 21:59:49 pm
I suspect we have a big problem, The creator of the hack has not been seen here since September 18. Does anybody have enough knowledge to look at the price regen problem. I am just trying to get started with VM and don't know enough to find the bug.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: robert andrews on October 31, 2007, 10:34:21 am
Has anyone had the problem we seem to have and know a way round it. after putting the hack on it we found that all the products which had a custom attrib worked OK but all the products which had no custom attributes come up with this error

Undefined variable: this_key in c:\inetpub\wwwroot\administrator\components\com_virtuemart\classes\ps_product.php on line 1816

we are running this on a windows server and IIS for our internal intranet.
thanks
Rob
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: haipham on October 31, 2007, 19:38:39 pm
pls help me,
i just make a custom attribute like this:
Leather Color(checkbox)(title-hover)(Black|images/http://nycnailsupply.com/website/white_granite.jpg)
but it did not show the image, something wrong with the link?
pls see at:
http://www.nycnailsupply.com/index.php?page=shop.product_details&flypage=flypage_new&product_id=151&category_id=99&manufacturer_id=0&option=com_virtuemart&Itemid=1

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: haipham on October 31, 2007, 19:43:40 pm
pls help me,
i just make a custom attribute like this:
Leather Color(checkbox)(title-hover)(Black|images/http://nycnailsupply.com/website/white_granite.jpg)
but it did not show the image, something wrong with the link?
pls see at:
http://www.nycnailsupply.com/index.php?page=shop.product_details&flypage=flypage_new&product_id=151&category_id=99&manufacturer_id=0&option=com_virtuemart&Itemid=1

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: umbcel on November 01, 2007, 01:05:16 am
I have a BIG problem with this marvelous hack.
I am using Joomla 1.0.13 and VM 1.0.13a
I follow the instruction step by step with more attention and i modify the all two files.
But when i try to show a product now i see only white pages.
Please help me!!!!
I attach here the two modified files of VM for a control.
Please help me, i need this wonderful hack!

Thanks so much in advance (...and sorry for my bad english)


[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on November 01, 2007, 01:41:54 am
When I installed the hack all I did was copy the modules posted in the hack. I think the code was only posted so we can understand the changes made in the hack.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: umbcel on November 01, 2007, 03:25:58 am
When I installed the hack all I did was copy the modules posted in the hack. I think the code was only posted so we can understand the changes made in the hack.

I also copied the two PHP files that are in ZIP but cannot copy the other two files because are of an older release of VM.
Following all instructions the hack not function to me.

Please help me!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on November 02, 2007, 11:30:49 am
When I installed the hack all I did was copy the modules posted in the hack. I think the code was only posted so we can understand the changes made in the hack.

I also copied the two PHP files that are in ZIP but cannot copy the other two files because are of an older release of VM.
Following all instructions the hack not function to me.

Please help me!


The hack need to overwrite files to work.

You cannot install the hack with only two files afaik.

CAE2.1 files:
18-09-2007  16:56  ps_product.php
10-09-2007  21:24  ps_product_attribute.php
23-05-2007  17:34  ps_product_custom_attribute.php
18-09-2007  17:10  ps_product_custom_type.php

Copy the files into: administrator/components/com_virtuemart/classes/

Remember to backup files first! :)

/cbach
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: karamalla on November 02, 2007, 19:25:31 pm
Hello,

I would like to remove all Items Attributes such like  size(), color(), please help how I can delete it from my products.

Regards
Karamalla
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on November 05, 2007, 14:11:54 pm
PLEASE, ANYONE! I am still having trouble with an issue and no one seems to be able to solve it. I have installed the custom attribute hack but file uploads still remain compulsory. The new version was meant to fix them to being only optional, but it doesn't seem to have worked for me? Please help, someone!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jhdesign on November 06, 2007, 22:13:21 pm
Same issue here. All fields are still required, can't add to cart.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on November 06, 2007, 22:42:27 pm
I created an extra single checkbox field that was checked by default and then hid it with a style of display:none.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on November 07, 2007, 15:21:42 pm
I created an extra single checkbox field that was checked by default and then hid it with a style of display:none.

Captain Paralytic, did you do this in the custom attributes? What code did you use? Ta! Desperate for this!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on November 07, 2007, 20:05:36 pm
Yes I did it in the custome attributes, but then I hacked the hack to put a style="display:none;" on that particular control.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on November 08, 2007, 11:43:33 am
Yes I did it in the custome attributes, but then I hacked the hack to put a style="display:none;" on that particular control.

Sorry Captain, I realise this might sound stupid, but where did you insert the hide style? I've added a file upload box in custom attributes and called it hidden file, but do I then add this in the css, the php, where? Do I need to define a class to it? If you could give me the details that would be great.

Ta!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on November 08, 2007, 12:00:48 pm
I'll try top post an example later on
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on November 08, 2007, 12:31:13 pm
thanks so much!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on November 08, 2007, 21:06:14 pm
OK, on line 211 of my copy of ps_product_custom_type.php, I added the style='display:none' as shown below.

Code: [Select]
if($value_img){
$show_value .= "<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' />";
}
$html .= "<div style='display:none' class='checkbox_box' style='border: 1px dotted #CCC; margin: 2px; padding: 2px; float: left;'>"; // CSS Style
$html .= "<input type=\"checkbox\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"".$titlevar."[]\" value=\"".$base_var."\" ". $checked ."/>".$show_value;
$html .= "</div>";
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on November 08, 2007, 21:54:21 pm
captain, that is already there for me? What am I doing wrong?! Do I need to add anything into the css now to refer to that class? I am bamboozled!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on November 08, 2007, 22:00:54 pm
As delivered the code looks like:
Code: [Select]
if($value_img){
$show_value .= "<img src='".$mosConfig_live_site."/".$value_img."' alt='".$show_value."' class='".$titlevar."_img' border=0 align='left' />";
}
$html .= "<div class='checkbox_box' style='border: 1px dotted #CCC; margin: 2px; padding: 2px; float: left;'>"; // CSS Style
$html .= "<input type=\"checkbox\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"".$titlevar."[]\" value=\"".$base_var."\" ". $checked ."/>".$show_value;
$html .= "</div>";

Note that there is NO style='display:none' in the div definition. In my version there is!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dilby on November 08, 2007, 22:27:15 pm
still doesn't work :( I feel as thought I'm destined to wander helpless through this one....
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: topclass on November 10, 2007, 06:30:22 am
Hi, can anyone help me out with weight change attributes.

I run a printery and i want need the weights to change based on my clients selection of quantity.

Lets say they chose 1000 flyers its 5lbs and then 5000 flyers its 10lbs. How can i set this up? I only see an option for one weight for the parent item.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Maree on November 12, 2007, 11:12:24 am
Hi all,

I uploaded the hack as per the insturctions on the first post of this thread however I get the following error and it wont list any products.

Fatal error: Call to undefined function: tax_based_on_vendor_address() in /home/xxxxxx/public_html/administrator/components/com_virtuemart/classes/ps_product.php on line 1390

What am I doing wrong?

Thanks in advance

Maree
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: riesengross on November 12, 2007, 12:05:54 pm
The original hack does not run with Virtuemart 1.0.13a. I modified the files and attached them in post #223 (i think its aroung page 15) in this topic. Please download the original hack and replace the files with the attached files in post #223. In all my installations the hack is running.

Best regards
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: David Richmond on November 12, 2007, 16:23:10 pm
What would be the best way to hack VM to allow you to pass a custom attribute in the URL so you could manually specify all your custom attribute in a URL for instant one click adding to cart (for instance a banner or a configurator)  Example:


http://www.myshoppingcarturl.com/index.php?option=com_virtuemart&page=shop.cart&func=cartAdd&product_id=10&customattribute=Color:Red;Size:XL

Or Like This

http://www.myshoppingcarturl.com/index.php?option=com_virtuemart&page=shop.cart&func=cartAdd&product_id=10&customattributecolor=Red&customattributesize=XL

Although I would think the first url would make more sence since Virtuemart stores the custom attribute string in one field within the database.

Thanks for any help -- I'm not necessarily asking someone to do the work for me just help point me in the right direction with some pseudo code!

David
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jhdesign on November 12, 2007, 23:44:28 pm
Can someone post an attribute example that shows optional input? Does version 2.1 work with VM 1.0.12?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: khorn on November 13, 2007, 23:07:56 pm
I am using v2.1 of this hack with Joomla 1.0.12 and VirtueMart 1.0.12.

We want to take donations, so have set up a "product" that costs 0.00, with a custom attribute that looks like this:
Donation(price)(help us out|field-below)(25.00|+)

Everything works OK, until I get to the point of the user clicking checkout, at which point the additional amount in the custom attribute is lost, and the item is reset to a $0.00 value.

This seems to be the same issue as has been previously reported in this thread (Reply #188, #231, various others).

Has anyone come up with a solution to this issue?  A workaround?  Anything?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on November 14, 2007, 08:36:21 am
I am using v2.1 of this hack with Joomla 1.0.12 and VirtueMart 1.0.12.

We want to take donations, so have set up a "product" that costs 0.00, with a custom attribute that looks like this:
Donation(price)(help us out|field-below)(25.00|+)

Everything works OK, until I get to the point of the user clicking checkout, at which point the additional amount in the custom attribute is lost, and the item is reset to a $0.00 value.

This seems to be the same issue as has been previously reported in this thread (Reply #188, #231, various others).

Has anyone come up with a solution to this issue?  A workaround?  Anything?

There's no workaround yet.

Rollback to older VM version did the trick for me.  :-\
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Captain Paralytic on November 14, 2007, 10:58:49 am
Rollback to older VM version did the trick for me.  :-\

Which version did you end up with?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on November 14, 2007, 11:03:41 am
Rollback to older VM version did the trick for me.  :-\

Which version did you end up with?

The old CAH, VM 1.0.11 and Joomla 1.0.12.

It was a bit uphill, but it works. :)

/cbach
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Bruce H Sicherman on November 15, 2007, 16:38:10 pm

The old CAH, VM 1.0.11 and Joomla 1.0.12.

It was a bit uphill, but it works. :)

/cbach

Were you able to just install over the previous level or was it more complicated
Title: Visible/Invisible Custom Attributes
Post by: Russell Dyer on November 19, 2007, 22:19:41 pm
Can you create a custom attribute saying something like, click this check box to display more options. 
So when you click the checkbox, a textbox and a option field become visible below them??  Or can the option to click those options be locked unless you first choose the first checkbox??

Thanks for any help

Russ
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Christian Bach on November 20, 2007, 09:03:53 am
Were you able to just install over the previous level or was it more complicated

Sorry for the late reply...

I did a complete new site with import of data. I actually have it working now with Joomla 1.0.12 & VM 1.0.12 and the old hack.

Please note that I haven't tested all features in the hack...

/cbach
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: macsnjets on November 20, 2007, 17:09:58 pm
The original hack does not run with Virtuemart 1.0.13a. I modified the files and attached them in post #223 (i think its aroung page 15) in this topic. Please download the original hack and replace the files with the attached files in post #223. In all my installations the hack is running.

I think I need a little help here. I'm running Joomla 1.0.13 and Virtuemart 1.0.13a. I downloaded the 2.1 hack from page 1 and replaced the files from the post #223, then uploaded the four files to  /administrator/components/com_virtuemart/classes/ and I get the following error when I click on a product.
Code: [Select]
Fatal error: Cannot instantiate non-existent class: ps_product_custom_type_ in /homepages/20/d106366989/htdocs/embroidery/administrator/components/com_virtuemart/classes/ps_product_custom_attribute.php on line 68
Am I doing something wrong ? I'm not too sharp when it comes to coding. Do I still have to edit any files as in page one instructions or are all the files already edited ?
Thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: m. on November 26, 2007, 18:54:22 pm
Hello,
hope you'll understand my english  ;)

I Installed the Hack and everything works fine excepting the file-upload. I'm trying to solve the problem since 3 days and I did't find an apposite answer yet.

When I choose an image of my hard disk, I get "Error: File/Image Upload Error".

As Attribute Data I used the example from barnett:
File Upload(file)(upload file of type .jpg or .doc|title-below)(images/|.jpg,.doc)

The installed version of Joomla is 1.0.13
The installed version of VirtueMart is 1.0.12

I added some rows to the file ps_product_custom_type.php to get some informations about the variables which could be interesting. This is what I get:

$titlevar:
File_Upload

$_FILES[$titlevar]:
Array ( )

print_r($_FILES):
1Array ( [product_id] => 1 [File_Upload] => C:\Fotogalerie\image.jpg [custom_attribute_fields] => Array (

print_r($_POST):
1Array ( )

print_r($_GET):
1


I think the problem is that $_FILES[$titlevar] is empty. Can anyone of you imagine why it is empty?
I am really desperate and have no more ideas. Hope you can help me.

Thanks a lot
M.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: hobartimus on November 28, 2007, 06:06:12 am
I am using the latest version with VM 1.0.12 and everything is working great. I only wonder has anyone figured out how to include a link in the invoice for uploaded files? This would be extremely useful.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: m. on November 30, 2007, 12:50:55 pm
When I choose an image of my hard disk, I get "Error: File/Image Upload Error".
I solved the problem whith the tip of mcchin
http://forum.virtuemart.net/index.php?topic=28192.msg95589;topicseen#msg95589 (http://forum.virtuemart.net/index.php?topic=28192.msg95589;topicseen#msg95589)

I didn't searched good enough. Sorry.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: JoeB on December 01, 2007, 21:17:31 pm
Very noob question for using the file upload attribute.  I am using Joomla 1.0.13 & VM 1.0.12 with the 2.1 hack files.  My setup is a sandbox on a windows machine.  The joomla and VM are fresh installs, but in a subdirectory.  I keep getting File/Image Upload Error whenever I try and use the flie upload attribute.  I am using the sample VM data, just adding
Art Work(file)(upload artwork, $20.00 charge|title-below)(images/|.jpg,.doc|20.00)

to the Chain Saw product.

I think the problem is location of the images subdirectory.  Where is the root directory that this is off of?  Since its windows there shouldn't be permission issues.
-Joe
Title: Illegal variable error (SOLVED)
Post by: bottledup on December 08, 2007, 03:17:45 am
I have installed this hack and had customised my variables. Everything was fine until one day when I check out an item, this error comes up: Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script. This is only happening to one of the products and not all.

Has anyone else experienced this problem or have a solution?

Thanks!

Update Turned out I had numbers eg "1." and "2." in front which caused the error.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: matrix99999 on December 11, 2007, 19:03:50 pm
This hack is wonderful!! one question: if i choose a Color i have one price multiplied for every product. but is it possible to have on further fixed price only if i choose the attribute? thanks in advance and sorry for my english, i'm from VENICE!  8) ;D
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: normdis on December 11, 2007, 23:05:45 pm
Hi Everybody
Its a very nice Script you wrote here Barnett thank you.

But i have a little bug.

When i add a product to the cart, with advanced attributes including additional costs and i update the amount in the basket, the attributes values are removed from the price.

Example:
Product costs 10.00  i choose 1 peace
Attribute is 5.00

= Total 15.00

now in the basket i change to 2 peaces and i get
= Total 20.00 instead of 30.00

What or where should i start search to fix that.

Many thanks for Help in advance.
CU
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Willem Couwenberg on December 12, 2007, 12:46:58 pm
Hi

Thanks for this great Hack with so much possibilities! I only have some problems with the file upload function.

I made a form  (quit extended ) on this website https://www.americadirectbook.com/virtuemart/Relationship-The-two-of-us/My-Personal-Relationship-Horoscope/Detailed-product-flyer.html (https://www.americadirectbook.com/virtuemart/Relationship-The-two-of-us/My-Personal-Relationship-Horoscope/Detailed-product-flyer.html)

With this custom attribute code for the last field upload file between 150 kb and 5mb:
Code: [Select]
Picture Upload(file)($5.00 per picture. The quality of the reproduction in
  your book is directly related to the quality of the picture submitted with
  the order form. We strive to make your picture reproduce in your book as good
  a resolution as the submitted image allows. Maximum size 2 Mb Minimum size
  150 Kb. Larger pictures can be send to us by email. Clicking the add to cart button
uploads the photo|field-below)(images/clientupload/|.jpg,.JPG,.jpeg,.JPEG|5.00|5000000|150000)

When I upload a file larger than 2 Mb I get an error message saying it is to small
"Error: File Tom & Pat Pope.JPG is too Small! Must be over 150000 bytes"

I called my web host he says it is no problem to upload files larger than 2 Mb as long as ftp is in active mode, I don't know if this is applicable for upload via a website.

Does anybody have a clue what could be the reason for the website denial of uploading files bigger than 2 Mb, is there a server setting or a MySql setting I can change to make bigger than 2mb possible or could this also be in the code of virtuemart/joomla!(vm 1.0.13a, jml 1.0.13). ???

Also if I go to this specific image directory via the back office via Menu Site-> Mediamanager -> File upload, it doesn't allow me to upload files bigger than 2 mb. ???



Thanks in advance, ;D
Regards Willem-Hein

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: matrix99999 on December 12, 2007, 22:41:38 pm
normdis i have the same bug! if anyone has the solution is welcome!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: ecomeback on December 16, 2007, 01:45:29 am
Hello,

I didn't read the full thread, but I think there is a bug in the code. At step four you wrote
Code: [Select]
global $charge;
$charge = array();
maybe it is better you don't overwrite the global value with an array, so there are problems
with text elements attribs e.g. how use the global value in other methods. So the global value get lost in the cart.

If you want to initialize an array if the global value is empty or not an array better take this.

Code: [Select]
global $charge;
if(!is_array($charge))
{
   $charge = array();
}

cu
Guido
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: matrix99999 on December 16, 2007, 12:56:05 pm
i've found a SMALL solution for the problem of updating. I fix only for price attribute, but i think it's no difficult to apply to the other attributes. in ps_prduct_custom_type line 63, a replace this code:
return "vm_charge".$charge[$pagevar];
whit this:
return "vm_charge".'['.$price_type.$default_price.']';
the main problem is that the global array $charge is lost during the update cart. i repeat that it's not a final solution but better than nothing. please TEST TEST and TEST! i'm doing also one further attribute: a fixed price adding only one time independentment the number of products.
that's all folks!
ps. sorry for my english!
Dueffe Rulez!!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: BrettD on December 18, 2007, 16:35:07 pm
Thanx for the great hack, Barnett!  We needed popups to work from the attribute code, and I'm not sure this is the best way but thought I would post incase someone else is interested.

To support defining a simple popup window in the custom attribute code, find the function customAttributeVars in ps_product_custom_attribute.php and change the "(" to "{" and ")" to "}" whereever the parens are found there.

Then, when defining attributes, use { and } instead of ( and ).  And here is the resulting attribute code i used:

Monogram Style{select}{<a href=dummy.html OnClick="return (window.open('http://www.yoursitehere.com/MonogramStyles.html','MonogramStyles','menubar=1,resizable=1,width=350,height=250')) && false">Explain This</a>|field-below}{None*,Monogrammed [+5.00]|,Embroidered [+5.00]|};

notice the && false on the return (window.open('http://www.yoursitehere.com/MonogramStyles.html','MonogramStyles','menubar=1,resizable=1,width=350,height=250')) && false

we can't end the statement with a ; because the ; separates statements, so this was a quick and easy way to return false without having to change more code.

Thanx again!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jlucare on December 28, 2007, 00:04:53 am
Will the hack work in VM 1.0.13a?

If not, is there a way to display a "recommended donation level" and allow the user to insert the amount that they want to give/pay?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Niels on December 28, 2007, 09:40:00 am
Hi,

will this "mod" be ported to new VM 1.1 ?

Thanks and best regards

Niels
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: malviv on December 29, 2007, 23:16:19 pm
Hi, this is the 1st major hack I have tried and am having a few problems...

I already have products with attributes, the hack affected them and made it so the products could not be viewed.

the following error come up - Parse error: syntax error, unexpected $end in /home/dewhurs/public_html/joomla/administrator/components/com_virtuemart/classes/ps_product_attribute.php on line 582

the same error appears if I create a new product using the hack and after again when I try to re enter the product details. 

The only way back for this point is the restore the original files..

What have I done wrong?  Is there a module or companent that I can use instead of hacking the files?

Many thanks....  Mal


Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dionysus on December 31, 2007, 21:32:49 pm
Hello All,

I am on Joomla 1.0.13
VirtueMart 1.0.13a

Here is the custom attribute I am testing to upload logo's

Custom Artwork(file)(upload file of type .jpg, .gif, .png, .bmp|title-hover)(images/|.jpg,.gif,.png,.bmp)

However, it's not coming up properly. I read thru all 19 pages, but still cannot get it to work.

Does anyone have some guidence?

Thanks

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Preston Moore on January 03, 2008, 00:35:12 am
I have some advice...run like hell.  That seems to be what the dev did anyway.

I've read through all 19 pages of this and STILL can't decide if I want to commit hackicide.

You would think with so many posts, and the obvious popularity of the hack that someone who knew what they were doing would take this thing, actually make it work, and charge $20 or $30 dollars for it (probably could get more, I'd pay). 

But then again, what do I know.   ;)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: r.mike on January 09, 2008, 16:30:49 pm
Hello,

I'm french and i'm sorry for my bad speaking.

I just discover, joomla, Virtuemart and this hack. Thanks to all programmers of this three developments.

I read lot of topics but don't found answers, maybe because i don't understand very well english, so excuse me if my questions have been previously asked.

- it is possible with -r to say a field is required, but is it possible to show the empty required fields after submit for help user ? (label in bold or red for example)
- on upload file, is it possible to show a thumbnail in cart and on update attribute page if file type is supported (jpg, png, gif, ...) as this example :
(http://img176.imageshack.us/img176/7446/cartexamplemq9.th.jpg) (http://img176.imageshack.us/my.php?image=cartexamplemq9.jpg)
I've create this system for my website (studio-dalix) but i want to upgrade this website to virtuemart for all wonderful options of this componant.

Thanks for your answer ...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: BEAH on January 22, 2008, 01:10:06 am
I'm stuck with this errors:

When i press a category i'll get this;
Fatal error: Call to undefined method ps_product_attribute::show_quantity_box() in /storage/mijndomein/users/085426/public/sites/www.mcflyproducts.com/n/administrator/components/com_virtuemart/html/shop.browse.php on line 431

When i press a product i'll get this;
Fatal error: Call to undefined method ps_product_attribute::get_product_attribute() in /storage/mijndomein/users/085426/public/sites/www.mcflyproducts.com/n/administrator/components/com_virtuemart/html/shop.product_details.php on line 355

Someone know why?


And then, when it works, is it able to make a dropdownlist and when people click on a item, the frontpage picture will change to that item? So like when the picture is black, and people choose item: Red-Grey, the image will turn red-grey?

thanks!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: ceap80 on January 29, 2008, 18:16:27 pm
Hi all.

I have a problem with this hack, and i think anothers too.

I have a custom property:

Select Affirmation:(select)(another tip|title-hover)(None [+0.00]|, I am colors [+5.00]|,I am creative [+5.00]|,I am energy [+5.00]|,I am freedom [+5.00]|)

The base price of the product is around 20 $

When i select one of the custom properties and click add to cart, the cart only show the base price ($20) when it should display ($25)

Anybody with the same problem has found a solution?

Thanks in advanced!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dionysus on January 30, 2008, 21:51:12 pm
I have some advice...run like hell.  That seems to be what the dev did anyway.

I've read through all 19 pages of this and STILL can't decide if I want to commit hackicide.

You would think with so many posts, and the obvious popularity of the hack that someone who knew what they were doing would take this thing, actually make it work, and charge $20 or $30 dollars for it (probably could get more, I'd pay). 

But then again, what do I know.   ;)


I would also pay for this feature...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: normdis on January 31, 2008, 17:47:17 pm
Hi Ted hi all, thank you for the very nice work.

I worked arround and added more functions to VM witch i need, now i have one problem.

When i add a product to the basket with custom attributes the price is added to the product price. But if i update the basket or if i return to the basket after doing more shopping, the custom atributes price is gone, the values are stil there.

Example custom attributes text fields:

Yourname : Example Name
User1: Name1 (+ CHF 10.00)
User2: Name2 (+ CHF 9.00)

after updating it looks like that

Yourname : Example Name
User1: Name1
User2: Name2

Could you or sombody knowing that hack well please tell me where i could find this problem.

Many thanks in advance.
CU
Matt
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: seavers on January 31, 2008, 19:21:22 pm
I have found a simple workround for custom prices, I thought I posted the code yesterday but it doesn't seem to have appeared?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cr33 on January 31, 2008, 20:36:01 pm
It seems that some of this code is already in 1.0.14?  Also that this is already integrated into 1.1?

This mod looks promising, but I might have to roll my own anyway.  I need some way to not only give a quantity-based discount to products, but also to their attributes (not children) as well...  Ugh - getting a headache just thinking about it!

Thanks,
Chris
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Nirm on January 31, 2008, 22:22:51 pm
I've got a dev who is working out a way to apply a discount to a shopper group using percentage and quantity e.g  25% of for 3 or more purchased. This will be applied at shopper group level.

I'll keep you posted - there will be a cost but I will look at recovery only if anyone is interested.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: LEaf on February 01, 2008, 02:53:42 am
I have some advice...run like hell.  That seems to be what the dev did anyway.

I've read through all 19 pages of this and STILL can't decide if I want to commit hackicide.

You would think with so many posts, and the obvious popularity of the hack that someone who knew what they were doing would take this thing, actually make it work, and charge $20 or $30 dollars for it (probably could get more, I'd pay). 

But then again, what do I know.   ;)


I would also pay for this feature...

Me three. And I don't need all the features. All I need is a limited by quantity text field that you pay per character, and the limited (as in limited file type) upload artwork file feature. But I need them, like, now. Anyone have a magic wand? :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: hankeymeal on February 08, 2008, 03:30:35 am
I can`t get the file upload works.I tested with
Joomla 1.0.13 & VM 1.0.12 / Joomla 1.0.13 & VM 1.0.14 / Joomla 1.0.13 & VM 1.1.Beta3.All I get is "Error: File/Image Upload Error".Can anyone tell me which version VM does it really works?

Thanks
Title: A few problems with Custom Attributes Extended 2.1 [Hack]
Post by: chriskabisch on February 11, 2008, 18:29:52 pm
I'm using this hack:

Custom Attribues Extended 2.1 [Hack]http://forum.virtuemart.net/index.php?topic=28192.0 (http://forum.virtuemart.net/index.php?topic=28192.0)

Here are a few other problems I'm having:

Problem#1

When 3 or more attributes are selected the price duplicates on attributes listed in the cart. The math is correct but the visual makes no sense.

product1
attribute1: Single (+ $1.95)
attribute2: Single (+ $1.95)
attribute3: (text missing here)(+ $3.90) (+ $3.90)
attribute4: Single (+ $1.95)
attribute5: Half (+ $1.00)
attribute6:Double (+ $3.90) (+ $3.90)

It should look like this

product1
attribute1: Single
attribute2: Single
attribute3: Double (+ $3.90)
attribute4: Single (+ $1.95)
attribute5: Half (+ $1.00)
attribute6:Double (+ $3.90)

Any suggestions?

Problem#2

I have have 30 different attributes to choose from however not all are necessary. Is there a way to only have the attributes that have been selected show up in the cart and the invoice. if you choose three products with 3 or 4 attributes each it shows all 30 attributes in the cart and on the invoice.

attribute1: (+1.95)
attribute2:
attribute3:
attribute4:
attribute5:(+1.95)
attribute6:
attribute7:
etc...

This makes for a long and rather confusing invoice.

Problem#3
Is there a way to have the attribute price show up in the subtotal line for a proper invoice? This seems like an obvious problem that needs a solution.

I'm also having trouble making making attribute optional.

I'm using this string of code:

It looks like the solution below is not complete.  If you only comment out the line as shown, then the if clause will have a syntax error.  Instead find the two lines below and change them as follows:

From:
Code: [Select]
if ( ($result["attribute_given"] == false && !empty( $result["advanced_attribute_list"] ))
|| ($result["custom_attribute_given"] == false && !empty( $result["custom_attribute_list"] )) ) {
To:  (Note the additional ){ at the end of the first line and then the // at the beginning of the second line.)
Code: [Select]
if ( ($result["attribute_given"] == false && !empty( $result["advanced_attribute_list"] )) ) {
//|| ($result["custom_attribute_given"] == false && !empty( $result["custom_attribute_list"] ))

I haven't tested this so if someone can try it and report back, that would be good.

http://forum.virtuemart.net/index.php?topic=32892.0 (http://forum.virtuemart.net/index.php?topic=32892.0)

This works great except that it leaves out the auto selected attributes. When using the syntax: * = selected
Any suggestions?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: codmic on February 13, 2008, 21:29:54 pm
I've been working on a fix for the update cart problem when using the custom attributes hack. I started a new thread on this because this thing is taking much too long to be fixed.

You can find this thread:
http://forum.virtuemart.net/index.php?topic=36469.0 (http://forum.virtuemart.net/index.php?topic=36469.0)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on February 19, 2008, 07:50:14 am
hello,

first , thanks for this great hack. i have downloaded the latest files and it runs well up to the checkout page.
after adding a product with a custom attribute teh page shows the cart and the price reflect the custom attribute price added to the product price. but when i click on "checkout" instead of "continue shopping" the price of the custom attribute is not transfered. the custom attribute shows up in the description field but the price is back to the regular product price
i attached 2 screenshot to show the difference.

did anybody had the same problem?

thanks for the help
cheers

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: codmic on February 19, 2008, 13:44:17 pm
Hi,

I had exactly the same problem and have been breaking my neck over this thing for about 2 days. You can find a workarount for this problem on the forum ( http://forum.virtuemart.net/index.php?topic=36469.0 ). After you apply this hack the prices will be ok, even after you refresh the cart.

I have only one problem problem with this method, if a shopper adds something to the cart the VAT / TAX will be applied 2 times for each product in the cart! If you refresh or checkout the double tax dissapears and eveything looks like it should be. I hope someone else can also take a look at this problem, i've been working on a fix for this problem for almost 2 days last week..

As a workaround I check some post variables in my template and redirect to the cart if nessecary so the customer won't notice the tax difference but, e.g. in case of a file upload and the upload fails, the notice message (unable to upload or something) wont be seen either.

So, I think were almost there but we have to fix this TAX problem.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on February 19, 2008, 14:47:24 pm
Hi codmic,

thanks for your reply and help.
first i am surprised nobody else had that problem. kindda weird.

second: i tried your fix but was unsuccessful. it still does not work.


i start to wonder if i should not just try with a new fresh install and do it again. even though i spent so much time tweaking and setting the store...config etc... i am scared to redo everything again.

anyway thanks again.

cheers
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: lucamel on February 19, 2008, 15:26:11 pm
I have the same problem.. I used the codmic's solution too, but it doesn't work on my site..
I hope someone can find a solution..
thank you codmic for your engagement!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: codmic on February 19, 2008, 21:08:23 pm
Hi, i've been working on this 'workaround'  for two days so it would be great if I can also help you guys out.


I have been debugging with the messy code below, you can paste this (temporary) in you template or something. Just take care that the $debug variable is set to true.

Code: [Select]
<?
if($debug)
{
echo '<b>Charge =</b>';
var_dump($_SESSION['charge']);
echo '<br />';

echo '<hr >';

echo '<b>HTTP Post Variables:</b><br />';
foreach($_POST as $key => $value)
{
echo '<b>' . $key . ' -> </b>' . $value . '<br />';
}

echo '<hr >';

echo '<b>SESSION Variables:</b><br />';
foreach($_SESSION as $key => $value)
{
echo '<b>' . $key . ' -> </b>';
var_dump($value);
echo '<br />';
}

echo '<hr >';

echo '<b>Template Debug Message(s):</b><br />';
echo $sDebugMsg;

global $charge;
var_dump($charge);

echo '<hr />';

foreach($_SESSION['cart'] as $key => $value)
{
echo $key . '<br />';
}

echo '<hr />';

echo '<b>request custom_attribute_fields:</b>';
var_dump($_REQUEST["custom_attribute_fields"]);
}
?>
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on February 21, 2008, 04:09:43 am
Hi codmic.

thanks for you perseverance, that's really nice to see people helping like you do.

i have to admit i have never been playing with debug before, so i am not too sure what i am supposed to see but here is the info i got from the debug center window:
after clicking "add to cart" i get this string of info: (so you know the base price is 89$ and when i add a custom attribute it adds 60$ for a total of 149$.
for $_session
Array
(
    [cart] => Array
        (
            [idx] => 1
           
                (
                    [quantity] => 1
                    [product_id] => 57
                    [description] => Embroidery Initial:JB
                )

        )

    [ps_vendor_id] => 1
    [minimum_pov] => 50.00
    [vendor_currency] => USD
    [auth] => Array
        (
            [show_prices] => 1
            [user_id] => 64
            [username] => julien
            [perms] => shopper
            [first_name] => julien
            [last_name] => benisty
            [country] => VNM
            [zip] => 0004
            [shopper_group_id] => 5
            [shopper_group_discount] => 0.00
            [show_price_including_tax] => 1
            [default_shopper_group] => 1
            [is_registered_customer] => 1
        )

    [session_userstate] => Array
        (
            [product_id] => 57
            [category_id] => 2
            [keyword] =>
            [viewlistlimit] => 50
            [view2limitstart] => 0
            [view0limitstart] => 0
        )

    [last_page] => shop.cart
    [product_sess] => Array
        (
            [56] => Array
                (
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561413
                        )

                    [vendor_id] => 1
                    [flypage] => shop.flypage
                )

            [51] => Array
                (
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561413
                        )

                    [vendor_id] => 1
                    [tax_rate] => 0
                )

            [60] => Array
                (
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561414
                        )

                    [vendor_id] => 1
                    [tax_rate] => 0
                )

            [57] => Array
                (
                    [vendor_id] => 1
                    [tax_rate] => 0
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561473
                        )

                    [flypage] => shop.flypage
                )

            [58] => Array
                (
                    [vendor_id] => 1
                    [tax_rate] => 0
                )

            [59] => Array
                (
                    [vendor_id] => 1
                    [tax_rate] => 0
                )

        )

    [custom_attribute_fields] => Array
        (
           
        )

    [custom_attribute_fields_check] => Array
        (
            [Embroidery_Initial] => Embroidery_Initial
        )

)

$vars:     product_id=>57
Embroidery_Initial=>JB
custom_attribute_fields=>Array
custom_attribute_fields_check=>Array
quantity=>1
flypage=>shop.flypage
page=>shop.cart
manufacturer_id=>1
category_id=>2
func=>cartAdd
option=>com_virtuemart
Itemid=>86
839fe0d05053a00f4672007c207762f8=>5522e8d62d54f5ee1f6c7d05d89e2cf2
virtuemart=>9a206b1c03b99ff29a3d99fba4e678d2
ebee5b87ade41c05b1b7e91575728a76=>5a871db34cbde39d30f8a38b2655f920
5a427df7a263425ebfec65d6363b961e=>882de203de2aea77adbb6b3f7030f2b250d2912c393dc831436fc8850dbdabed64
description=>Embroidery Initial:JB
order_subtotal_withtax=>149
payment_discount=>0
zone_qty=>1
total=>149

and after i click "check out" i get this:

$_SESSION:     

Array
(
    [cart] => Array
        (
            [idx] => 1
           
                (
                    [quantity] => 1
                    [product_id] => 57
                    [description] => Embroidery Initial:JB
                )

        )

    [ps_vendor_id] => 1
    [minimum_pov] => 50.00
    [vendor_currency] => USD
    [auth] => Array
        (
            [show_prices] => 1
            [user_id] => 64
            [username] => julien
            [perms] => shopper
            [first_name] => julien
            [last_name] => benisty
            [country] => VNM
            [zip] => 0004
            [shopper_group_id] => 5
            [shopper_group_discount] => 0.00
            [show_price_including_tax] => 1
            [default_shopper_group] => 1
            [is_registered_customer] => 1
        )

    [session_userstate] => Array
        (
            [product_id] => 0
            [category_id] => 0
            [keyword] =>
            [viewlistlimit] => 50
            [view2limitstart] => 0
            [view0limitstart] => 0
        )

    [last_page] => checkout.index
    [product_sess] => Array
        (
            [56] => Array
                (
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561413
                        )

                    [vendor_id] => 1
                    [flypage] => shop.flypage
                )

            [51] => Array
                (
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561413
                        )

                    [vendor_id] => 1
                    [tax_rate] => 0
                )

            [60] => Array
                (
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203561414
                        )

                    [vendor_id] => 1
                    [tax_rate] => 0
                )

            [57] => Array
                (
                    [vendor_id] => 1
                    [tax_rate] => 0
                    [discount_info] => Array
                        (
                            [amount] => 0
                            [is_percent] => 0
                            [create_time] => 1203562548
                        )

                    [flypage] => shop.flypage
                )

            [58] => Array
                (
                    [vendor_id] => 1
                    [tax_rate] => 0
                )

            [59] => Array
                (
                    [vendor_id] => 1
                    [tax_rate] => 0
                )

        )

    [custom_attribute_fields] => Array
        (
           
        )

    [custom_attribute_fields_check] => Array
        (
            [Embroidery_Initial] => Embroidery_Initial
        )

)

     
$vars:    page=>checkout.index
option=>com_virtuemart
Itemid=>86
839fe0d05053a00f4672007c207762f8=>5522e8d62d54f5ee1f6c7d05d89e2cf2
virtuemart=>9a206b1c03b99ff29a3d99fba4e678d2
ebee5b87ade41c05b1b7e91575728a76=>5a871db34cbde39d30f8a38b2655f920
5a427df7a263425ebfec65d6363b961e=>882de203de2aea77adbb6b3f7030f2b250d2912c393dc831436fc8850dbdabed64
order_subtotal_withtax=>89
payment_discount=>0
zone_qty=>1
total=>89

the only thing that i see is that the variables
Embroidery_Initial=>JB
custom_attribute_fields=>Array
custom_attribute_fields_check=>Array
and
description=>Embroidery Initial:JB

are not passed on to the checkout process even though it shows "Embroidery Initial:JB" in the description field 9see attachment.

i hope that will help you.
i tried putting back the files i backed up to be back to a"normal" process without the hack and reinstall the hack again and still the same problem.
i run virtuemart 1.0.13a

thanks again,
cheers
julien
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cer on February 22, 2008, 01:36:17 am
total newbie...

1st thanks to all who contribute to this without getting any money!!


I wonder if this hack s already part of VM 1.1. or do I  have to apply this hack, too?
thanks
g
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on February 22, 2008, 02:45:05 am
hey that's a good question, it's seems to have this feature already, but i did not find any doc on the syntax to use so i am not sure if it's axactly the same.
i would not be surprise though, as it is an extremely important add-on to VM

let's see if we have answers to that. but at the same time just try to use it the same way to see if it works. you should just receive an error or nothing would happen if it's not the same.

cheers
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cer on February 25, 2008, 15:08:56 pm
bobthebob01, you're right.
I believe there are pieces of the hack inside the VM 1.1 code. but the syntax must be different . no error but it just doesn't work.
help or clarification appreciated.
cer
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: codmic on February 29, 2008, 09:25:25 am
Hi Julien,

Did you applied my extra hack to the custom attributes hack ? I don't see the 'extra_charge' in the cart array!
I updated my Joomla and VM version and now I'm running Joomla 1.0.15 / VM 1.0.14.

You can find the altered files here:
http://forum.virtuemart.net/index.php?topic=36469.0 (http://forum.virtuemart.net/index.php?topic=36469.0)

What you have to do is:

Always make a backup of your files before messing around with hack's!
I use JoomlaPack to create a simple backup of my DB and files before customizing working things!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on February 29, 2008, 10:20:50 am
thanks for that codmic. i will try that and let you know
cheers
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cer on March 04, 2008, 12:06:34 pm
anybody with info regarding the custom attributes hack and VM 1.1?
Is it implemented yet?
what is the syntax like?
thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 05, 2008, 10:17:22 am
First sorry for my english I'm from Poland.
Is it possible to have options for attributes?
For example.
I have shop with embroidery badges and in the detail page of badge you can choose to have it alone or made on cloths.
Now i have attributes to  select cloth for badge and there is black t-shirt, white t-shirt, white baseball cap, black baseball etc.
Is it possible to have a variant to T-shirt (black, white, blue) and variant for cap (black, red, yellow).
Problem is with colours because each product has difrent colours so I can't just add One more attribute.
Please help or advice some sollution for this.

Zyke
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Nirm on March 05, 2008, 11:13:18 am
Zyke

you can do this with child products - set up a parent product called badges - then create  child 1 = badge without cloth, child 2 = with cloth. In child 2 you can add attributes like black t shirt, white t shirt, colours and sizes. this should work for you without having to hack anything.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 05, 2008, 12:05:52 pm
Zyke

you can do this with child products - set up a parent product called badges - then create  child 1 = badge without cloth, child 2 = with cloth. In child 2 you can add attributes like black t shirt, white t shirt, colours and sizes. this should work for you without having to hack anything.
I try to do this but:
1) I couldn't add product to basket because there was a note from virtuemart to choose all atributes but there were no atributes to choose.
2) I think I made it easer my attributes looks like this:
Code: [Select]
umieścić na(select)(Jeśli chcesz możemy umieścić naszywkę bezpośrednio na ubraniu|field-above)(Tylko naszywka,Czapka Army Czarna [+22]zł|images/atrybuty/armycz.jpg,Czapka Army Moro [+22]|images/atrybuty/moro.jpg,Czapka Army Safari [+22]|images/atrybuty/safari.jpg,Czapka Baseball Classic [+22]|images/atrybuty/classiccz.jpg,Czapka Baseball Comfort [+22]|images/atrybuty/comfortcz.jpg)
the first attributes is only badge

What i want to do is to add colours to atribute cap, add different colours to t-shirts, and different colours to polo shirts etc.
is it possible?

the second question is how to control the size of the text field and place where it appears?

Zyke
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Nirm on March 05, 2008, 12:36:33 pm
hello zyke,

I have created a test product for you to see please look here
http://www.cofit.co.uk/index.php?page=shop.product_details&flypage=shop.flypage_modern&product_id=250&category_id=14&manufacturer_id=0&option=com_virtuemart&Itemid=87

you will see a drop down - called select a color group - please ignore the text as it is customised for my site, but you will be able to select with cloth and without cloth and you will get further attribute choices - also ignore the overlapping divs on with cloth option - i have customised

is this what you are trying to achieve?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 05, 2008, 14:54:26 pm
Hi Nirm
Yes that's it You'r the Man

I tryed but there are problems I listed below
Check this:

http://www.naszywki.net/index.php?page=shop.product_details&flypage=shop.flypage_n&product_id=29&category_id=6&manufacturer_id=0&option=com_virtuemart&Itemid=66 (http://www.naszywki.net/index.php?page=shop.product_details&flypage=shop.flypage_n&product_id=29&category_id=6&manufacturer_id=0&option=com_virtuemart&Itemid=66)

And try to add this product to cart:
And other questions:
1)  how to get rid of "- Baseball () 15.01zł"
2) How to display atributes without ":" and in one verical line without margin.
3) How to add to cart :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Nirm on March 05, 2008, 15:50:43 pm
R U Using Custom Attributes Hack?

If so I'm sorry but cannot help you - the product I setup was without the Custom Attributes hack.

:(
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 05, 2008, 16:19:30 pm
Yes I'm using tgis hack. Plese give me some advice what to do? I't is almost done but You can't add product to cart
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Nirm on March 05, 2008, 17:15:08 pm
If you are satisfied with the way I set up the products then I would suggest that you remove the hack and use the normal advanced attributes. It works very well.

I can't really help you on Custom Attributes Hack as I do not know anything about it - from reading the messages on the forum, it appears to be buggy and not 100% working.

Sorry!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 06, 2008, 01:48:52 am
Thank You Nirm for Your help. I realy appreciate Your advices and time spend on my problem.
Hope I will find solution.
by the way. Do You know how to get rid of displaying "- Baseball () 15.01zł" in my shop? Is this because of Hack?

 
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jakebls on March 06, 2008, 18:59:40 pm
Does this hack work with VM 1.0.14?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 10, 2008, 19:56:00 pm
Hello
I have big problem with this hack. It's great but not working in my case.:)
The problems started whn i tried to mix child products with Extended attributes. After many tries i left this idea but from that time
 when I add any attributes to product and try to add to cart I have a info: To add this product into your cart you have to select a product variant on the details page.

Please help I get stuck
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Nirm on March 11, 2008, 07:57:31 am
this kind or error usually happens when you are trying to add a parent product to the cart - once you created a child product the parent cannot be added to the cart. please use the parent product to hold descriptions of the product and put all attributes etc in child product :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: lilith2014 on March 11, 2008, 21:40:32 pm
excuse me, Im kinda nobbie. What happens when a notice says this:
Quote
Notice: Use of undefined constant this_true_value - assumed 'this_true_value' in /home/developer/public_html/raygraham/administrator/components/com_virtuemart/classes/ps_product.php on line 1691

How can I take that out?

JOOMLA V1.0.0 // LAST VM
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cer on March 13, 2008, 22:52:09 pm
anybody working on this hack for vm1.1?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: lilith2014 on March 17, 2008, 18:04:36 pm
Quote
Notice: Use of undefined constant this_true_value - assumed 'this_true_value' in /home/developer/public_html/raygraham/administrator/components/com_virtuemart/classes/ps_product.php on line 1691
PLEASE COULD SOME ONE TELL ME WHAT TO DO.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Darkstar2 on March 18, 2008, 15:56:23 pm
Very nice Hack, thank you!

But I have a little problem with the multiple textbox. There don't appear any $ - before or after the price.

Thank you for Help!

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bebe on March 18, 2008, 21:59:26 pm
Hello,

Great work. Thank you. I did all 6 steps and it looks just fine but if I want to upload a picture and add it to the cart I get this:
Error: File/Image Upload Error.
Any suggestions what I did wrong?

I have virtuemart 1.0.13 and Joomla 1.0.13
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Justin Holstein on March 24, 2008, 04:30:07 am
Haven't been able to find the answer for this anywhere in the fourms...Does the Custom Attributes Extended 2.1 [Hack] work for VM version 1.0.15? 
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 24, 2008, 10:28:04 am
How to set attribute name above the field not before  the field (I'm not talking about attribute title)
I want to have something like this for ex.:

Engrave:
[Textfield]

and in the hoover after Engrave: 3.00 per character

And not like this:

              3.00 per character
Engrave:[Textfield]

Can smb help me, I think it's very simple but I can't find the solution
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: UWiX on March 25, 2008, 11:00:07 am
Haven't been able to find the answer for this anywhere in the fourms...Does the Custom Attributes Extended 2.1 [Hack] work for VM version 1.0.15? 

I'm working with the latest version of VirtueMart. It's version 1.0.15 I'm using - so it works like hell!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: UWiX on March 25, 2008, 11:08:42 am
How to set attribute name above the field not before  the field (I'm not talking about attribute title)
I want to have something like this for ex.:

Engrave:
[Textfield]

and in the hoover after Engrave: 3.00 per character

And not like this:

              3.00 per character
Engrave:[Textfield]

Can smb help me, I think it's very simple but I can't find the solution

Where do you you want to use this option? With radio/checkbox/text?
Every option has it's own layout-procedure in the file ps_product_custom_type.php. For example the text attribute is declared in the class ps_product_custom_type_text (somewhere around line 699).
In the variable $html the layout is declared for the input fields.

In the file ps_product_custom_attribute.php the function customAttributeHTML(.. handles the rest of the layout. Shouldn't be that hard to figure it out - just read the lines where the HTML-tags are set and shuffle them around until you've got the right result (check the $HTML variable).

If you send me a p.m. with your request a bit more explained I could check it out for you and return you the source-code in the way you want it.

Greetz, Websnooky.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 27, 2008, 08:58:36 am
Hi everybody.
I have big problem with tax in attributes.
for ex. the attribute is [+10] and in the cart there is 12,2 becouse tax is 22% in my country.
Can somebody help?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: ksimba on March 27, 2008, 18:42:20 pm
Does anyone have this working on VM/Joomla 1.0.15?  If so PLEASE post the most recent version of the Hack.

Thank you.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on March 27, 2008, 21:49:03 pm
Hi,
I serched the forum and I didn't find solution for INCLUDED tax in Custom Attributes.
Please help.
 what can I do to avoid ading tax to the attributes in the cart.
I hope somebody know the solution.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: ksimba on March 28, 2008, 02:09:50 am
Hi,
I serched the forum and I didn't find solution for INCLUDED tax in Custom Attributes.
Please help.
 what can I do to avoid ading tax to the attributes in the cart.
I hope somebody know the solution.


Try setting your item up as 0.00 kg in weight and then turning off the virtual tax under Admin-Configuration- Tax Configuration-Virtual Tax. There is also a note there to edit the ps_checkout.php file. Also see this post http://forum.virtuemart.net/index.php?topic=21332.0
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cer on March 31, 2008, 09:12:43 am
with vm 1.1 almost released - is there anybody working on an updated custom attributes hack?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Justin Holstein on April 01, 2008, 17:01:03 pm
Does anyone have this working on VM/Joomla 1.0.15? It seems this is the only way to add attributes to an item and make them mandatory to select.  Otherwise you can just select one of the various attribute options and it allows you to pass on to checkout.

If anyone has got a solution for this problem or someone could point me in the right direction, it would be appreciated.  thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: freshink on April 01, 2008, 20:02:20 pm
Has anyone tried using this with version 1.1? or is there a way to add customer supplied pricing for donations in 1.1?

Thanks- Chris
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Brandon on April 06, 2008, 09:56:48 am
When an order is made are these custom attributes added to the database each attibute under it's own field, or do they all get combined into one field?

Basically, I want to use custom attributes to put a shipping address for each product ordered into the product database. Then have Pony-Express-Mailer connect to that database and decided where to mail each product.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Tom Kercher on April 17, 2008, 17:53:02 pm
Does anyone know if this hack will work with Virtuemart 1.0.15?

Thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on April 23, 2008, 19:27:12 pm
Folks! Anyone tried to hack the hack ;) to do the following:
I need that a given set of custom attributes to be added to the products by default, as they are created. Any ideeas/hints are greatly appreciated!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bulabula on April 23, 2008, 20:17:08 pm
I use a spreadsheet and CSV Improved component
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on April 23, 2008, 20:36:03 pm
Good ideea, but I have a shop with couple of front-end only shopadmins (using the Multi-Vendor and Multiple Logins hacks) and need, that all products added by hand by these to have the custom attributes field prefilled with given settings - so the CSV Import isn't an option for me.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on April 24, 2008, 05:43:38 am
Yes, i'll be very interested to have a version of the Hack for VM 1.1 in J1.5; that would be the only thing stopping from moving a site to the new version.


I hope the author and genius Barnett will be able to figure this one out. I'm not a developer but since joomla! 1.5 and therefore VM 1.1 have been completely rewritten as i understand it, it could be more complicated or need to start from scratch.

let's all cross our finger.

If Barnett read that post: May the coding force be with you!  ;D

cheers
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: nilam on April 24, 2008, 16:53:17 pm
Hello, I have read all the posts but did not find the answer to my two questions:
1 - Is it possible to have a fixed price for an attribute? like "6 boxes[= 12.00]€)" instead of "6 boxes[+8.00]€)?? (if not possible can we hide the +8,00 on the frontend??)
2 - As I use custom attribute to manage quantity package is it possible to block the add to cart quantity to 1 so that no-one buys 6 times the per 6 package?
I hope I am clear enough!!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Sublimetime on April 24, 2008, 18:06:52 pm
Yes, i'll be very interested to have a version of the Hack for VM 1.1 in J1.5; that would be the only thing stopping from moving a site to the new version.
I hope the author and genius Barnett will be able to figure this one out. I'm not a developer but since joomla! 1.5 and therefore VM 1.1 have been completely rewritten as i understand it, it could be more complicated or need to start from scratch.
let's all cross our finger.
If Barnett read that post: May the coding force be with you!  ;D
cheers


IS anyone ever going to complete this ESSENTIAL feature? .. If virtuemart wants to be taken serious.. this is the only thing ( in my view) that is holding it back.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: charobnjak on April 24, 2008, 18:17:39 pm
Does anyone know if this hack will work with Virtuemart 1.0.15?
Thanks
I have it working on my joomla 1.0.15 and virtuemart 1.0.15
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: nilam on April 24, 2008, 23:45:39 pm
Hello, I have read all the posts but did not find the answer to my two questions:
1 - Is it possible to have a fixed price for an attribute? like "6 boxes[= 12.00]€)" instead of "6 boxes[+8.00]€)?? (if not possible can we hide the +8,00 on the frontend??)
2 - As I use custom attribute to manage quantity package is it possible to block the add to cart quantity to 1 so that no-one buys 6 times the per 6 package?
I hope I am clear enough!!

I found answers to my questions, I post the answer as someone might be interested one day :
1°/ there is a mistake in ps_product_custom_type.php on line 314
change "$show_value = str_replace("[=","+",$show_value);"
by "$show_value = str_replace("[=","=",$show_value);"
2°/ To avoid such mistakes just hide the quantity inputbox.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: NickyV on April 26, 2008, 08:33:57 am
Yes, i'll be very interested to have a version of the Hack for VM 1.1 in J1.5; that would be the only thing stopping from moving a site to the new version.
I hope the author and genius Barnett will be able to figure this one out. I'm not a developer but since joomla! 1.5 and therefore VM 1.1 have been completely rewritten as i understand it, it could be more complicated or need to start from scratch.
let's all cross our finger.
If Barnett read that post: May the coding force be with you!  ;D
cheers

Oh man! I just spent most of day building a brand new (test) site in Joomla 1.5.3, with VM 1.1, managed to migrate everything within VM and almost everything else AND have the thing running in native 1.5 mode... feeling very pleased with myself... and then I thought "now, I'll just check out my products and then I can upload it over the top of the existing J1.0.12/VM1.0.12 site" - and FORGOT that i'd installed this Custom Attributes hack MONTHS ago and I NEED IT now!!!  My site is a personalised service site where my customers upload a photo and I customise it for them - and there's no way now I can find now for them to upload a photo without this hack.  I suppose I could provide an email link and have them email a photo *ponder*... but that's nowhere near as neat as the old way.  So - any chance this hack will be migrated to new Joomla/VM versions anytime soon?!  Cos my new site looks WAY prettier than my old one and I'm dying to upload it!

Cheers,
Nicky
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on April 26, 2008, 10:04:29 am
Hey Niky70

head over to this thread, you are not the only with this issue:
http://forum.virtuemart.net/index.php?topic=39018.new;topicseen#new

cheers
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Brandon on April 27, 2008, 19:02:07 pm
2°/ To avoid such mistakes just hide the quantity inputbox.

How do you hide the quantity input box?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: nilam on April 28, 2008, 22:21:37 pm
here is the answer I got on this site :
"change <input type="text".....
to <input type="hidden".... or rewrtie <input type="button"..... to <input type="hidden"...."
As I did it few days ago I don't remember which file I changed. :(
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: brystro on April 30, 2008, 03:49:22 am
This hack only seems to work in Joomla 1.5 legacy mode.  Anyone know what parts of the code that need to be changed to make this work in j 1.5 native mode?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: NickyV on April 30, 2008, 05:08:19 am
Does anyone know if this hack will work with Virtuemart 1.0.15?
Thanks
I have it working on my joomla 1.0.15 and virtuemart 1.0.15
I didn't have any luck with this in the VM1.1 version I'd built so I went back to VM1.0.15 and applied the 2.1 hack as listed and it appears to be working fine, with one minor exception.  I'm using 3 custom attribs, one being the file upload option with the following setting:

Upload photo(file)(files/|.jpg,.zip)

So, if I have this right the uploaded file should go to a directory called "files" - but this doesn't work, all the files that customers upload go directly into the root of the site.  I've tried it using the full path (ie. public_html/files) and adding in all the other sytax options in case they were required to make it work, but nothing changes this behaviour.  When I was running an earlier version of VM the files went to the right place and I haven't really changed anything else.  Any suggestions?

Cheers,
Nicky
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mckayc on May 02, 2008, 18:48:37 pm
Does anyone know if this mod will work in VM 1.1?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bobthebob01 on May 03, 2008, 10:45:22 am
Dude head over to this thread: http://forum.virtuemart.net/index.php?topic=39018.new;topicseen#new
some people have done an amazing job, and if you want to make a little donation, you are welcome.
Some users, including myself were in needof this hack for VM 1.1 so we have paid someone to do it. now of course the more sharing the cost the better.

but have look for yourself
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Marco on May 04, 2008, 01:09:28 am
Hi

I just released a beta version for VM 1.1
Have a look here http://forum.virtuemart.net/index.php?topic=39666.0

We need some testing done.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: fludewig on May 05, 2008, 14:07:26 pm
Hello I comes from Germany. My English is bad.

I use Custom of attribute Extended 2.1 (Hack) I would want for the attribute prices in the goods basket no tax in addition is calculated. This would want all my prices werden including value added tax indicated and I also for the attributes.

Can somebody help me? Thank you greeting Frank
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Klaus62 on May 07, 2008, 17:18:42 pm
Hello!

I work with „Joomla! 1.0.13 Stable“

Custom Attributes Extended 2.1 [Hack] functions very well.
Unfortunately I have got problems with the tax.

It is necessary for me to show all the prices including the taxes and not when it is already in the shopping cart.
What shall I change to see the prices including taxes in the product details?
Where should I change it?

I read out all the texts about that topic and I could not find anything concrete.

Thanks in advance,
Klaus

_______________________________
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: peyto on May 12, 2008, 03:37:26 am
hi everyone!

does Hack 2.1 cooperate with advanced searching according to parameters? (checkboxes etc...)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: antivir on May 18, 2008, 16:15:05 pm
barnett
I need some help.
I have
Quote
product article - 4B 256 and
Color(checkbox) - Black, White, Red
When I check White and Red, quantity 20 and press Buy, I have position in cart:
Quote
4B 256 - 20
Color: White,Red
But I need two position (each for every checkbox):
Quote
4B 256 - 20
Color: White
and
4B 256 - 20
Color: Red
Can you post the code for this or can you point me where to search?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: VMit on May 21, 2008, 07:59:05 am
I have asked about some illustrative demo. It was there, but now it is gone. The link in my bookmarks appear to be dead. And I searched the forum for more than an hour - no working demo! The sites that i found were running some .aspx (not VM).
Could anyone provide some links to see the hack in action?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: arttoart on May 21, 2008, 16:40:58 pm
Hai VMit,

I use the hack on www.arttort.eu (http://www.arttort.eu) incl. the file upload.

If you have questions let me hear
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: antivir on May 21, 2008, 18:49:19 pm
arttoart
Can you tell me how to combine this hack with childlist hack?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Klaus62 on May 21, 2008, 20:26:22 pm
Hello everyone!

Is there maybe anyone who can help me?
I still could not find a solution.
Unfortunately I am not a programmer and though my shop is nearly finished, I am at a loss.
-----------------------------------------------

I work with „Joomla! 1.0.13 Stable“

Custom Attributes Extended 2.1 [Hack] functions very well.
Unfortunately I have got problems with the tax.

It is necessary for me to show all the prices including(!) the taxes everywhere.

If I type in a price in the extended attributes, it appears in the product details without taxes.

What shall I change to see the prices including(!) taxes already in the product details?
Where should I change it?



Thanks in advance,
Klaus

-----------------------------------------------
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: SuffStaxx on May 24, 2008, 13:32:17 pm
Hello,

I've just implement the hack in the Virtuemart 1.0.15 - Works great, thank you!

Now I'm looking for a little tricky solution:

There is a product with 2 variants:

Size: Normal = 50 Euro
Size: Big = 70 Euro

Now I want to add 2 different attributes:

attribute for size normal + 1,50 Euro
attribute for size big + 5 Euro

Is this possible with this hack or another modification?

thank you!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: arttoart on May 28, 2008, 20:36:16 pm
arttoart
Can you tell me how to combine this hack with childlist hack?
What do you mean? I only made my products as a childlist and put the hack in every child- en mainproduct
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: krish on May 29, 2008, 13:28:56 pm
Hi all,

I was wondering if anyone had attemtted to implement the following using this hack.

I have a product that has some additional options presented as checkboxes using this hack.

However, there are a specific number of these optional options that must be checked.  For example, I could supply 10 options, but exactly 3 and only 3 must be chosen.

I can add the required javascript or PHP to monitor this; however the problem I have is assigning the required value to the syntax in order to grab it from the product detail page!

Code: [Select]
Optional modules(checkbox)(Please choose 3 optional modules|title-hover)
(Unit 211,Unit 212,Unit 213,Unit 214,Unit 215,Unit 263,Unit 217)
(3) // *This is where I am passing the required number of options that must be chosen.

What is the easiest method to use to pass *this value?

Thanks in advance for any pointers.
Krish...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: hobartimus on June 11, 2008, 21:56:56 pm
I know this question has been asked before, but I was wondering if anyone has figured out how to included uploaded files (from using the file attribute) in the order details and/or the order email?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: antivir on June 13, 2008, 13:31:24 pm
arttoart
Quote
What do you mean? I only made my products as a childlist and put the hack in every child- en mainproduct
I mean that childlist is another hack. There are global changes of same code.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: scoody on July 21, 2008, 18:19:30 pm
not easy syntax ...
i want to have a textarea with lengh
i want to have a textarea with width
i want it to calculate ALONE the surface

Lenght(text)(|field-below)(lenght in m|);
width(text)(|field-below)(width in m|);

and after ? ???
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: gunerh on August 11, 2008, 19:21:03 pm
I've sussed out the layout issue (for my application at least)
Changing 'label side' widths and 'Input side' widths in the ps_product_custom_attribute.php file and also the addtocart form position in the flypage.php sorted my layout/alignment issues of the custom attributes.
hey dazz can you show us what you ve don in detail. I have layout problems on internet explorer. you can check it at http://www.oshbazar.com/index.php?option=com_virtuemart&Itemid=57
thakn you
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Zyke on August 19, 2008, 01:16:41 am
Please help there are so many questions about the same thing,
How to show prices of the attributes including tax?
I can't believe that nobody knows the answer.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: marianaf on August 19, 2008, 03:40:49 am
Hello zyke and everyone.

It seems I have the same tax problem. When using the hack the taxes over my products disappear. Any Ideas?

thank you very much!

Mariana.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Anthony C. on August 21, 2008, 23:01:43 pm
Hi,

Nice hack for the attribute.

I have one question about getting the value of the discount.
How do you reverse and get the value

sample array:

Array
(
    [Promotion=> 5% off] => Array
        (
            [name] => Promotion=> 5% off
            [values] => Array
                (
                    [Discount] => Array
                        (
                            [name] => Discount
                            [operand] => -
                            [adjustment] => 0.48
                        )

                )

        )

)

I just want the operand and the adjustment value

Thank you
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: SMU on August 21, 2008, 23:57:32 pm
Hi

I also seem to have a tax problem with this hack. I am running Joomla 1.5.6 and VM 1.1.2.

When I enter this:

Code: [Select]
Name(Checkbox)(tip here|field-above)(attribute data[+1000-d]|)
I get this (see picture below):

(http://mobilinternet.dk/images/2008-08-21_235109.png)

Since I want tax (25%) to be added I would have expected the price to say SEK 1.250 and not SEK 1,00 !?

Can anyone please help? I need this fixed urgently!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Anthony C. on August 26, 2008, 01:03:30 am
How do I reverse retrieve the value from the array?

Array
(
    [Promotion=> 5% off] => Array
        (
            [name] => Promotion=> 5% off
            [values] => Array
                (
                    [Discount] => Array
                        (
                            [name] => Discount
                            [operand] => -
                            [adjustment] => 0.48
                        )

                )

        )

)

Thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: pfulhosting on September 07, 2008, 00:26:32 am
I've installed the files for the hack and when I attempt to view a product on the site I get: Fatal error: Call to undefined function: addrecentproduct() in /home/joomla/wwwroot/joomla.powerfulhosting.com/administrator/components/com_virtuemart/html/shop.product_details.php on line 136

I can't find anything in the hack directions that says to modify shop.product_details.php and I have not touched that file since the virtuemart install.

shop.product_details.php  has this in it:

$ps_product->addRecentProduct($product_id,$category_id,$tpl->get_cfg('showRecent', 5));
if( empty( $flypage )) {
       $flypage = $db->f('category_flypage') ? $db->f('category_flypage') : FLYPAGE;

Isn't is, in fact, defined???  Thanks for any help.  (I tried changing "AddRecentProduct" to "addrecentproduct" which is the way the error shows it and there is no change... still get the error.

I appreciate any help.  Thanks, Dave
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: marianaf on September 15, 2008, 15:02:56 pm
Hi everybody!

I have a problem with the hack when I use the file upload with another attribute type. Example:

A sua fotografia(file-r)(fotografia obrigatória|field-below)(imagensclientes/|.jpg,.doc|00.00);Comentários Adicionais(textarea)

I get an 500 INTERNAL SERVER ERROR IF I TRY TO UPLOAD ANY FILE. If I remore the textare field everything works great.

Plus: if I use more then one file upload field the same error happens...

Does anyone know why?

I use VM 1.1.2 and Joomla 1.5.6

Thank you very much...

Mariana
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: brewerfan82 on September 15, 2008, 23:24:31 pm
Hi everyone!
I need to implement an e-commerce system that allows for both donations and taxable goods on a website using Joomla 1.0.12. Using VirtueMart with this hack seemed like the best solution, so I installed VirtueMart 1.0.12 onto the website and applied the patch from the original post in this thread.

Everything seems to work, I can add a painting (i.e. a taxable good) to the shopping cart and then also add a user defined donation amount. However, when you click checkout or if you add another item (basically once you leave the initial order summary page after adding the donation) the donation amount resets to zero!

Any idea what's going on here?

Thanks!
Allen
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mykee on September 18, 2008, 20:57:42 pm
I have Joomla 1.5.7 and VirtuaMart 1.1.2. I need this mod! Anyone can help to me?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jordank87 on September 19, 2008, 13:11:05 pm
Hi does this work with joomla 1.5.x ???

Thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: steve2 on September 29, 2008, 00:45:14 am
Is there anyway for a user to enter any amount to donate instaed of having fixed or pre defined amount

Like paypal donation module but through virtuemart
Title: Run functions on Custom Attributes Extended ? (2.1 [Hack])
Post by: rjcroasdale on October 23, 2008, 03:42:02 am
Hi,

Just wondering if the date selector/calender in this hack allows to select dates only in the future, i.e you cant buy an item with a attribute "date" in the past.

if not, can someone..out of the 31,777 of us...who knows php write this, well lets call it my special ??? psudo  :-[ php  :P into the funciton segment (part of ps_product_attribute.php) see below apology :) (sorry peeps, i'm only on http://www.tizag.com/phpT/echo.php like  ::) 4th page of a php tutorial)   
<b> and yo community peeps, u rule</b> ;D

-----------------------
needs writing in php
-----------------------
<?php
   todaysdate=todaysdate
      if($attributes_array[$attribute_name]['values'][$value]['name'] = [Date}
      and ['value']<['todaysdate']
         then
   echo "Cant book an event in the past, unless you just want to give me money!"; ?>
   
-------------------
integrating into (part of ps_product_attribute.php) *may not be correct place to do this* php newb.
-------------------
<?php   function getAdvancedAttributes( $product_id ) {
      global $ps_product;
      if( is_null( $ps_product )) {
         $ps_product = new ps_product();
      }
      $attributes_array = array();
      $attributes = $ps_product->get_field( $product_id, 'attribute' );
      // Get each of the attributes into an array
      $product_attribute_keys = explode( ";", $attributes );
      foreach( $product_attribute_keys as $attribute ) {
         $attribute_name = substr( $attribute, 0, strpos($attribute, ",") );
         $attribute_values = substr( $attribute, strpos($attribute, ",")+1 );
         $attributes_array[$attribute_name]['name'] = $attribute_name;
         // Read the different attribute values into an array
         $attribute_values = explode(',', $attribute_values );
         $operand = '';
         $my_mod = 0;
         foreach( $attribute_values as $value ) {

            // Get the price modification for this attribute value
            $start = strpos($value, "[");
            $finish = strpos($value,"]", $start);

            $o = substr_count ($value, "[");
            $c = substr_count ($value, "]");   
            // check to see if we have a bracket (means: a price modifier)
            if (True == is_int($finish) ) {
               $length = $finish-$start;

               // We found a pair of brackets (price modifier?)
               if ($length > 1) {
                  $my_mod=substr($value, $start+1, $length-1);
                  //echo "before: ".$my_mod."<br>\n";
                  if ($o != $c) { // skip the tests if we don't have to process the string
                     if ($o < $c ) {
                        $char = "]";
                        $offset = $start;
                     }
                     else {
                        $char = "[";
                        $offset = $finish;
                     }
                     $s = substr_count($my_mod, $char);
                     for ($r=1;$r<$s;$r++) {
                        $pos = strrpos($my_mod, $char);
                        $my_mod = substr($my_mod, $pos+1);
                     }
                  }
                  $operand=substr($my_mod,0,1);

                  $my_mod=substr($my_mod,1);

                  
               }
            }
            if( $start > 0 ) {
               $value = substr($value, 0, $start);
            }
            $attributes_array[$attribute_name]['values'][$value]['name'] = $value;
            $attributes_array[$attribute_name]['values'][$value]['operand'] = $operand;
            $attributes_array[$attribute_name]['values'][$value]['adjustment'] = $my_mod;
            $operand = '';
            $my_mod = 0;
         }
         
      }
      return $attributes_array;
      
   }   ?>
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: appel on October 29, 2008, 22:51:48 pm
This tool is really fantastic and of course there will always be wishes for additional things, but the fact remains that this must be one of the best extensions for VM.
My wish is probably not so complicated but makes a lot of difference for visitors/customers.
If I add a price to an attribute (for instance 10.00) this amount is without taxes, even when the prices in the shop are inc. taxes. This is a bit confusing for customers because when they pick this option they think they have to pay 10.00 more but at checkout or in there cart they see that it is 10.00 + taxes.
I hope I made clear what I wanted to explain.
I'll look into this issue, but it may be a VM issue and not this hack, but I'll check into it.
-barnett

vi ps_product.php
in function getDescriptionWithTax
replace '$my_taxrate =$this->get_product_taxrate($product_id);'with
$my_taxrate = 0.00;

in the same file search for
// no set price was set from the attribs
if ($set_price == false) {

add
// josien.net btw hack used in www.pimpmijnbakfiets.nl
$my_taxrate = $this->get_product_taxrate($product_id);
$adjustment = $adjustment / ($my_taxrate+1);
$price["product_price"] = $base_price + $adjustment;

dirty quick easy but hey it works!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: troberts on December 02, 2008, 20:32:23 pm
I've installed the files for the hack and when I attempt to view a product on the site I get: Fatal error: Call to undefined function: addrecentproduct() in /home/joomla/wwwroot/joomla.powerfulhosting.com/administrator/components/com_virtuemart/html/shop.product_details.php on line 136
I can't find anything in the hack directions that says to modify shop.product_details.php and I have not touched that file since the virtuemart install.
shop.product_details.php  has this in it:
$ps_product->addRecentProduct($product_id,$category_id,$tpl->get_cfg('showRecent', 5));
if( empty( $flypage )) {
       $flypage = $db->f('category_flypage') ? $db->f('category_flypage') : FLYPAGE;
Isn't is, in fact, defined???  Thanks for any help.  (I tried changing "AddRecentProduct" to "addrecentproduct" which is the way the error shows it and there is no change... still get the error.
I appreciate any help.  Thanks, Dave
Also getting this exact same problem, does anyone have a solution?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: maevagiacometti on January 02, 2009, 11:15:35 am
Hello,

Thanks for this wonderful hack. I'm trying to install it but it doesn't work, i have a error message saying " Direct Access to this location is not allowed" when i want to connect on my site after making the modifications in the files. Is it because i'm using Joomla 1.5 ?

Thanks for your help...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Jeff on January 06, 2009, 16:14:15 pm
Is there any way to impliment a bulk image uploader here like swfupload or jumploader? PLEASE, PLEASE! Help me out. Look, I'll pay you for it. :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mattos on January 13, 2009, 06:16:41 am
Using VirtueMart 1.1.2 stable and Joomla! 1.0.15 Stable, I installed Custom Attributes Extended 2.1 and it caused fatal errors.

Has anyone installed successfully on the above versions?

I need to add multiple selections to my attribute list, similar to a pizza with various toppings. Has anyone come across a solution for this?

Thanks Matt
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: aravot on January 13, 2009, 20:03:22 pm
VirtueMart 1.1.2 version of the hack can be found here -> http://forum.virtuemart.net/index.php?topic=39666.0
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: anthony on January 21, 2009, 03:27:41 am
"Using VirtueMart 1.1.2 stable and Joomla! 1.0.15 Stable"

Me too. I've been searching & reading for hours trying to find someone thats done this hack with this config ... no luck so far.

"VirtueMart 1.1.2 version of the hack can be found here -> http://forum.virtuemart.net/index.php?topic=39666.0"
Actually that seems to be only for J1.5 - they don't seem to address J1.0.x

So it seems if you are running the latest VM and J1.0.X , then theres no hack for you (that I can find).

Thats a bummer because I just upgraded a cart presuming there was a hack for VM1.1.2 on J1.0.15, but I didnt realise it was only for J1.5 ... so my shop is down, while I work out what to do...

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: ericweb on January 22, 2009, 01:41:54 am
Custom Attributes Extended 2.1 is realy good hack.
But The layout Attribute Data: is not the same Internet Explore 7 is not nice but ie 6 en firefox 2 is good.
http://casaverkopen.dreamhosters.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=14&category_id=6&option=com_virtuemart&Itemid=2 (http://casaverkopen.dreamhosters.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=14&category_id=6&option=com_virtuemart&Itemid=2)
theme.css adapted without result.
Quote
LETOP!(line)(|)(Verplicht in tevoeren velden*);
(line)(|)(Deze gegevens worden niet weer gegeven op de website);
Selecteer (radio)(|)(Dhr,Mevrouw);Achternaam (text-r)();
Voornaam(text-r)();
Email(text-r)(Weer gegeven op de site|field-below)(); 
Straat(text-r)();huisnummer(text-r)();Plaats(text-r)();
Postcode(text-r)(Eventuele link naar de makelaar|field-below)();  
Verkopende Makelaar(text)();Eigendomssituatie(text)();(line)(|)(Bouw.);
Soortwonings(select)(|)partement,Eengezinswonig,Tussenwoning,Hoekwoning,Vrijstaande woning);Bouwjaar(text)();
Soortdak(text)();
Isolatie(text)();
(line)(|)(Indeling);
Woonoppervlakte m²(text)();
Inhoud m³(text)();
Perceel oppervlakte m²(text)();
Aantal Slaapkamers(select)(|)(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31);
Aantal badkamers(select)(|)(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31);
Aantal woonlagen(select)(|)(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31);
Toileten(select)(|)(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31);
Voorzieningen(textarea)( maximum 360 karakters of 9 lijnen.|field-above)(|text-d);(line)(|)(Energie.);
Energie Label(select)(|)(Niet aanwezig,Aanwezig);Soortverwarming(text)();
C.V Ketel(text)();(line)(|)(Buitenruimtes);Ligging van het tuin(text)();
Tuinoppervlakte m²(text)();
Voortuinoppervlakte m²(text)();
(line)(|)(Bergruimte);Schuur/berging(text)();
(line)(|)(garage);Garage(select)(|)(Niet aanwezig,Aanwezig);Aantal auto(select)(|)(0,1,2,3,4,5,6,7,8,9);
(line)(|)(Maximaal 360 karakters of 9 regels.);Omschrijving(textarea)(|text-d);
Indeling van het huis(textarea)(|text-d);
Bijzonderheden(textarea)(|text-d);
LETOP!(line)(|)(Max size 2 Mb Min size150 Kb only in jpg format);
(line)(|)(Clicking the add to cart button uploads the photo);
Picture Upload 01(file)()(images/clientupload/|.jpg,.JPG,.jpeg,.JPEG|0.00|2000000|6000);Picture Upload 02(file)()(images/clientupload/|.jpg,.JPG,.jpeg,.JPEG|0.00|2000000|6000);
Picture Upload 03(file)()(images/clientupload/|.jpg,.JPG,.jpeg,.JPEG|0.00|2000000|6000)
Is there a solution for
thanx eric

Joomla 1.5.7 vm 1.1
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: ashiwebi on January 30, 2009, 06:54:46 am
Are these hacks can be implemented in joomla 1.5.4 and virtuemart 1.1.2.

Thanks in advance.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: quickturn on March 16, 2009, 06:56:28 am
Hoping someone can help a rookie, here.

Desired effect: 3 Checkboxes; "None", "Laser Engraved", and "Pad Printed". "None" is obviously $0 but the other two are $150.00 each. The user can only choose one of the 3 options and the price is a flat price (not per unit). Here's what i have (which is obviously wrong):

Customization(checkbox)(Flat charge, regardless of quantity|field-above)(None [0.00]*,Laser Engraving [150.00|],Pad printing [150.00|])

If I use +150.00, it makes it per unit. Any help is appreciated.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: quickturn on March 17, 2009, 02:23:03 am
If this hack can't accomplish what I'm trying to do, anyone know of a way I can get a flat rate attribute adder without it calculating by unit?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: JasonSTX on March 19, 2009, 15:26:26 pm
Hoping someone can help a rookie, here.

Desired effect: 3 Checkboxes; "None", "Laser Engraved", and "Pad Printed". "None" is obviously $0 but the other two are $150.00 each. The user can only choose one of the 3 options and the price is a flat price (not per unit). Here's what i have (which is obviously wrong):

Customization(checkbox)(Flat charge, regardless of quantity|field-above)(None [0.00]*,Laser Engraving [150.00|],Pad printing [150.00|])

If I use +150.00, it makes it per unit. Any help is appreciated.

I would use a dropdown instead of a group of checkboxes as that is the only way to ensure 1 is selected.

Customization(select)(Flat Charge, regardless of quantity|field-above)(None, Laser Engraving[+150.00], Pad Printing[+150.00])

However, this will still add $150 to the per item quantity.  I assume someone orders 500 items and they want laser engraving on all so if it was $1 an item, you want it to charge them $650 total.  If they ordered only 100 items, it would be $250 total.

Since this adds on to the existing product attribute system, any price additions will be per unit, but you could instead have Laser engraving and pad printed as a child item, something they add to the order as a sub item.  I ordered 500 widgets, and I want to add Laser Engraving as an item option so I just add the product called Laser Engraving to my order.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: quickturn on March 19, 2009, 17:18:32 pm
Hoping someone can help a rookie, here.

Desired effect: 3 Checkboxes; "None", "Laser Engraved", and "Pad Printed". "None" is obviously $0 but the other two are $150.00 each. The user can only choose one of the 3 options and the price is a flat price (not per unit). Here's what i have (which is obviously wrong):

Customization(checkbox)(Flat charge, regardless of quantity|field-above)(None [0.00]*,Laser Engraving [150.00|],Pad printing [150.00|])

If I use +150.00, it makes it per unit. Any help is appreciated.

I would use a dropdown instead of a group of checkboxes as that is the only way to ensure 1 is selected.

Customization(select)(Flat Charge, regardless of quantity|field-above)(None, Laser Engraving[+150.00], Pad Printing[+150.00])

However, this will still add $150 to the per item quantity.  I assume someone orders 500 items and they want laser engraving on all so if it was $1 an item, you want it to charge them $650 total.  If they ordered only 100 items, it would be $250 total.

Since this adds on to the existing product attribute system, any price additions will be per unit, but you could instead have Laser engraving and pad printed as a child item, something they add to the order as a sub item.  I ordered 500 widgets, and I want to add Laser Engraving as an item option so I just add the product called Laser Engraving to my order.

I like this. I haven't worked with child items before. Is it a mod/plugin? Is it intuitive and easy to "add this also" right from the product page?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: land0 on March 29, 2009, 04:12:51 am
Hello all,

What would one have to do to get the summary cart list of custom attributes to only show the ones that a customer selected?

Thank you in advance.  :D

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: quickturn on March 30, 2009, 03:02:55 am
Hoping someone can help a rookie, here.

Desired effect: 3 Checkboxes; "None", "Laser Engraved", and "Pad Printed". "None" is obviously $0 but the other two are $150.00 each. The user can only choose one of the 3 options and the price is a flat price (not per unit). Here's what i have (which is obviously wrong):

Customization(checkbox)(Flat charge, regardless of quantity|field-above)(None [0.00]*,Laser Engraving [150.00|],Pad printing [150.00|])

If I use +150.00, it makes it per unit. Any help is appreciated.

I would use a dropdown instead of a group of checkboxes as that is the only way to ensure 1 is selected.

Customization(select)(Flat Charge, regardless of quantity|field-above)(None, Laser Engraving[+150.00], Pad Printing[+150.00])

However, this will still add $150 to the per item quantity.  I assume someone orders 500 items and they want laser engraving on all so if it was $1 an item, you want it to charge them $650 total.  If they ordered only 100 items, it would be $250 total.

Since this adds on to the existing product attribute system, any price additions will be per unit, but you could instead have Laser engraving and pad printed as a child item, something they add to the order as a sub item.  I ordered 500 widgets, and I want to add Laser Engraving as an item option so I just add the product called Laser Engraving to my order.

I simply cannot get this to work. Primarily because I have "Color" attributes set up. So when i add a child item, the item shows up in a pulldown but the color selector is gone. And naturally, I can't add to cart because its asking to select a variable (the color, which isn't there). But even if I do select the child item, it is still adding $150 per unit.

This has held up my site launch for weeks and I just can't figure it out.

If someone knows this answer in browsing but doesn't want to take the time to explain, I'll Paypal you 10 bucks or whatever to at least make it worth a few seconds to post.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: lukesdyer on April 16, 2009, 21:52:16 pm
I am looking to use (line)();
but not have the colon in front of the line.

The following shows up automatically:
<label for="_field">:</label>

I did try removing the colon from within the label tag on ps_product_custom_attribute.php page. However that made the form not pass the additional cost of [+5.00], so i put it back.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Jupp on April 27, 2009, 22:00:38 pm
Hello,

it´s really fantastic Hack.

But I had 2 problems :


So what is wrong with the following code :

Code: [Select]
Bestellen Sie hier gleich optionales Zubehör mit(line)( |field-below)( );
Pflichtzusatz(radio-r)
(Der Handgriff ist notwendig wenn kein Podest gewählt wird|title-hover)
(Podest mit 3 Geländerteilen Art.-Nr. 06029*[+74.78991597],Handgriff aus Holz Art.-Nr. 06210[+8.319327731]);
Zusatzartikel(checkbox)( |field-below)
(inkl. Unterbau Höhe 150cm Art.-Nr. 06020 [+78.99159664],inkl. Unterbau Höhe 240cm Art.-Nr. 06040 [+131.092437],
inkl. Unterbau Höhe 350cm Art.-Nr. 06079 [+196.6386555],
inkl. Unterbau Höhe 480cm Art.-Nr. 06099 [+293.2773109],
inkl. Erdankerschraubenset 4 feststehende Art.-Nr. 06490 [+150.4201680],
inkl. Erdankerschraubenset 2 feste und 2 klappbare Art.-Nr. 06590 [+167.2268908],
inkl. Dachkonstruktion 140 × 140 x 150 cm Art.-Nr. 06199 [+74.78991596638],
inkl. Sandsack Art.-Nr. 07400 [+8.403361345])
;Fensterzusatz(radio)(Sie können zwischen den Plexiglasscheiben und Windladenset wählen da beides außen angebracht wird ist die Montage von beiden Artikeln nicht möglich|title-hover)
(Plexiglasscheibenset 3 Stück Art.-Nr. 07310[+49.57983193],
Windladenset 3 Stück Art.-Nr. 07339[+41.17647059])

Would be really great if I get help here.

PS: Sorry for my bad english
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: medgeley on May 27, 2009, 19:10:27 pm
Hi

I really do hope you can help.  VirtueMart seems to be able to do anything, except set a delivery date and time.

Our courier charges different amount depending on whether we want flowers deliverd on a week day or on a Saturday.  We also get charged for different delivery times on these days.

What I want...

I want our customers to be able to select the delivery date and delivery time (before 9am, before 12 or between 8am and 6pm).  This information would then be stored in the database and they would be charged the correct amount depending on the delivery date selected.

I want our customers to be able to select the delivery date at the time of checkout.

I have not found anything that can do this yet.  Can you help?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: notelseit on May 29, 2009, 11:33:56 am
not easy syntax ...
i want to have a textarea with lengh
i want to have a textarea with width
i want it to calculate ALONE the surface

Lenght(text)(|field-below)(lenght in m|);
width(text)(|field-below)(width in m|);

and after ? ???


resolved ?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: notelseit on May 30, 2009, 00:43:02 am
Has anyone been able to do this?

I'm using this for a fabric shop, but it isn't working correctly. What I've done is add a select box with Add more, and a select box to subtract length. here is a screenshot.
(http://riscit.info/sewing1.PNG)

I order 12 and 3/4 yards of fabric. Total should be $126.86 ((12 yards * $9.95) + $7.46) as shown below

(http://riscit.info/sewing2.PNG)

But as you can see what its doing, is taking the price of one yard and adding the 3/4 to it and multiplying that times the price, which is not what I want to do.

Any way to fix these prices?
resolved ?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: David Richmond on June 16, 2009, 22:33:30 pm
For the love of all that is holy add this bug fix to the next release! I just spent 3 hours tracking down the root of the formatting issues with internet explorer and this hack (Firefox looks wonderful,) but IE looks like a dang kindergartner made a website lol.

on or about line 821 of
/administrator/components/com_virtuemart/classes/ps_product_attribute.php
you will see:

Code: [Select]
$html .= product_custom_attributes->customAttributeHTML($fieldVars['attr_type'], $fieldVars);
change this to:

Code: [Select]
$html .= '<div style="clear:both">' . $product_custom_attributes->customAttributeHTML($fieldVars['attr_type'], $fieldVars) . '</div>';
Now this hack looks decent in internet explorer and all the fields won't smush together making your site look bad in IE.

Thanks to all those who originally created the hack, updated the hack and maintain the hack -- here's my contribution to the project!

David
          
          
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: NowaComputers on July 03, 2009, 11:44:07 am
Hi everyone,

I have just implemented the Hack into one of the shops for a customer of mine. Working well, just what we needed. I have just one (probably very simple) question. Which is:

Since all the labels and textboxes/ checkboxes/ radiobutton are in separate divs, they all are either next to eachother or below eachother. I would like to have rowas of three, though.

So my first thought was to insert a simple break tag "</br>" here and there. Unfortunately VM or something else seems to strip it completely. I have checked the blacklisted tags for VM and that one says its allowed. Is there any other way to instert a break? Does anyone know which script strips the tags?

Thanks n advance.

Erik
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: David Richmond on July 03, 2009, 22:19:15 pm
Ok I've been working with this hack for a long time and love it but this is a php quesitons im hoping a guru coder can help me with.

The product_attribute is:

Enter Donation: 1.99 (+ $1.99)<br/> First Name: David<br/> Last Name:
Richmond<br/> Address Line 1: Anywhere<br/> Address Line 2: <br/> City: YourTown TOP<br/> State: California<br/> Zipcode: 54884<br/> Phone Number: 555-555-5555<br/> Email: me@here.com

When i want to work with these attirbutes in my code i do this:

Code: [Select]
<?php 

    
list($donation) = explode("<br/>",$row->product_attribute);
    
$donation explode(": ",$donation);
    
$donation ltrim($donation[1]); 

    return 
$donation

?>

My question: is there a better way to get the attributes into an array that i can reference by key value:  so i could say
Code: [Select]
$userdoation = attributearray[donation]; which would be much simpler.  My code is functional but I'm not sure its elegant....

David
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: soumapp on August 03, 2009, 00:34:41 am
Custom Attribues Extended 2.1 [Hack]
For Virtuemart 1.0.12
Allows you to turn your shopping cart into an in-depth shopping experience.  This hack enables you to allow different types of form elements to be included in each product.


Any sign of it being updated For Virtuemart 1.0.13
Already tired it..but dosnt seem to work with it..

thanks for any info....
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bpryor on August 09, 2009, 18:42:56 pm
Custom Attribues Extended 2.1 [Hack]
For Virtuemart 1.0.12
Allows you to turn your shopping cart into an in-depth shopping experience.  This hack enables you to allow different types of form elements to be included in each product.


Any sign of it being updated For Virtuemart 1.0.13
Already tired it..but dosnt seem to work with it..

thanks for any info....

Which version of Joomla are you using, 1.5?  Have you looked at this thread: http://forum.virtuemart.net/index.php?topic=39666.msg124761#msg124761

I have installed the converted hack in J1.5 and VM 1.1.3 and it is working fine. I do have a "minor" issue which I'm going to post in the other thread now.



Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: bhoult on September 08, 2009, 17:23:25 pm
Could anyone verify for me that adding a cost to a (file) updates the price in the javascript, it does not seem to be working for me and I am not sure if it is a problem with the hack or with my implementation of it.  Everything else seems to be working except this.

I have tried the following format variations:

Photograph 2(file)(test|title-below)(vmdocuments/|.jpg,.gif,.tif|25.00);
Photograph 2(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 2(file)(|)(vmdocuments|.jpg,.gif,.tif|25);
Photograph 2(file)(test|title-below)(vmdocuments/|.jpg,.gif,.tif|+25.00);
Photograph 2(file)(|)(vmdocuments/|.jpg,.gif,.tif|[25]);
Photograph 2(file)(|)(vmdocuments/|.jpg,.gif,.tif|[+25]);

The complete custom attribute list I am using is as follows:

Services(radio-r)(|)(Electronic Broadcast Only {Available M-F},Electronic Broadcast add on fee + emailing[+50]);
Renewal Fee(checkbox)(|)(Yes - renew broadcast after 2 week initial posting period[+20]);
Press Release(file-r)(|)(vmdocuments|.doc,.pdf);
Photograph 1(file)(Additional charge of $25 per photograph|field-above)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 2(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 3(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 4(file)(|)(vmdocuments|.jpg,.gif,.tif|+25);
Photograph 5(file)(|)(vmdocuments|.jpg,.gif,.tif|+25)
Items to be emailed(checkbox-r)(What items would you like emailed when your press release is sent out?|field-above)(News Release,Photo);
Release Date(date-r)(When would you like your press release to be sent out?|field-above);
Number of Pages(number-r)(|);
Subject Line(text-r)(The title of the email being sent out.|field-above)

My installation:

Joomla 1.5.9
Virtumart 1.1.2

Thanks in advance for any help.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: dr_pole on September 15, 2009, 14:12:30 pm
hi,
if have installed extended hack 2.15 on vm 1.1.3, but i can't fix that with the php notice-messages. i added 30 atributes and when add a product with some attributes it shows me the php notices in my cart.

what can i do to fix that?

thx
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: windgate on October 01, 2009, 20:25:24 pm
This hack doesn't work with VM 1.1.3 despite following the instructions closely. It would be great if it did work. This would provide a much needed function in VirtueMart.

Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: aravot on October 01, 2009, 22:23:07 pm
This hack doesn't work with VM 1.1.3 despite following the instructions closely. It would be great if it did work. This would provide a much needed function in VirtueMart.

 :o The hack is posted in VirtueMart 1.0.x section not in VirtueMart 1.1 section so it means it is for VM1.0 series, search the forum and you will find the VM 1.1 version.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: btbt on October 07, 2009, 20:53:26 pm

I'm trying to remove the white margin on the left had side of the custom attribute box so the attribute box goes full screen width.  I have figured out how to remove the thumbnail picture but the margin has continued below that paragraph ...

I've looked thru the forum, but don't see an answer - I have tried what another poster said a bit earlier in this thread about changing a few files (I think its more for different browsers), but that hasn't worked for the white margin.

I would have thought it would be in the main flypage code - but nothing I seem to do works.

Please find a screenshot of what I am trying to do ...

Any help is appreciated!    :)


James


[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: drum on October 16, 2009, 00:16:22 am
Thank's for this hack, we implement here:

http://www.widcard.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=7&category_id=4&option=com_virtuemart&Itemid=53&vmcchk=1&Itemid=53 (http://www.widcard.com/index.php?page=shop.product_details&flypage=flypage-ask.tpl&product_id=7&category_id=4&option=com_virtuemart&Itemid=53&vmcchk=1&Itemid=53)

Gender(select)(|)(Select|images/blank.jpg,Male,Female);
Birth Date(date)(ex. 1970-05-21|field-above)(|);
Birth Location(text)(|)(||);
Last Name(text)(|)(||);
First Name(text)(|)(||);

Address(text)(|)(||);
City(text)(|)(||);
Zip/Postal Code(text)(|)(||);
Country(text)(|)(||);
State/Province/Region(text)(|)(||);
Photo(file)(125x144 72pix/inch Max.1Mb|field-above)(images/|.gif,.jpg,.png,.doc|)

Joomla 1.5.14
Virtuemart 1.1.3

Regards, all it's ok!
Title: how do i show an image with a description
Post by: shinbet on October 21, 2009, 19:54:40 pm
hi
I am trying to display something with custom attribute. but i am not succeeding

I am trying to show a series of accessories for a product
i want my layout to be Product name,  checkbox,  image and product description

But for some reason, i can only get the description to work as a tool tip.
Here is my syntax

Code: [Select]
accessory name(checkbox)(description|title-hover)([+1.00]|images/accessories/apron.jpg);
Do i have to change something else in one of the php files?

Please help

Thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mlouw on December 11, 2009, 12:46:00 pm
Hi,

I'm trying to change the $product_image with an costum_type select box is there an hack for this or can i change something in this files cause I tried a lot coding but didn't figure it out quit yet.

Any help is appreciated!

thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Solle on December 11, 2009, 13:56:46 pm
Hey,

I just found a big problem for me! I have a store whith this hack and very happy whith the hack!

Only one problem;

I cant use the letter å in none of the fields! If i use the letter å the cart will empty it self and all i get is "Cart Empty". I wierd things is that the hack works fine whith ä,ö but not å.

Please help me!

/Solle
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cococococococo on January 06, 2010, 10:57:15 am
Hi,
I found out that Custom attribute extended hack doesn't work with currency selector for checkbox.
It doesn't convert the currrency just change the name
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 27, 2010, 10:24:29 am
I've sussed out the layout issue (for my application at least)
Changing 'label side' widths and 'Input side' widths in the ps_product_custom_attribute.php file and also the addtocart form position in the flypage.php sorted my layout/alignment issues of the custom attributes.
hey dazz can you show us what you ve don in detail. I have layout problems on internet explorer. you can check it at http://www.oshbazar.com/index.php?option=com_virtuemart&Itemid=57
thakn you
Hello! If you are still interested in this solution, watch this topic!
http://forum.virtuemart.net/index.php?topic=39666.msg218893#msg218893 (http://forum.virtuemart.net/index.php?topic=39666.msg218893#msg218893)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: jegan on January 29, 2010, 08:17:19 am
Hi all

I used the date attribute .
When I click on the date picker link .
The values are stored in the text box showing 2010-44-%D.
Instead of the the proper date.

Please advice me how to resolve it.

Thanks in advance

Thanks
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: cinr11 on March 02, 2010, 20:06:00 pm
Hi everyone,


 I installed the hack and it looks Great but the only problem is the price is not being added to the cart. Is this a bug? anyone have the same problem. I was told that the hack is not stable and once you use it you cant upgrade VM otherwise you will loose the hack. Unless someone comes out with a new hack. What does eveyone feel about this? I would love to see it but seems like there is more negatives than postives.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on March 03, 2010, 08:22:20 am
The hack is as is, no guarantees of any kind, meant to be used by PHP and VM aware people. This is the sum of countless hours of playing around with the code of many people and the end result is not for fainthearted. So you can't expect to got something as if you buy something from the retail store ;).
But the hack works if is properly used. I suggest that ask for professional support (1-2 hrs of outsourcing can be a great investment) if you don't find your way around.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: tharsos on March 10, 2010, 13:24:40 pm
I was wondering if it is possible to increase the size of the textbox? Is there any way to modify its width and height? Is there some file responsible for it?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on March 10, 2010, 15:22:01 pm
First of all - a small bug was discovered, which had the effect that in certain circumstances - more exactly when a minimal width/lenght was declared and the buyer did not changed the length value from the default - the hack behaved weird.
My fault, I did not solved the situation correctly.
So, please re-download the hack, this bug is solved. Other bugs can be around, TIA for helping me fixing them!
As for changing the input boxes:
1 Open ps_product_custom_type.php
2. Around lines 1125-1130 you will find the code for the input boxes, something like this:
Code: [Select]
$html .= $VM_LANG->_('PHPSHOP_WIDTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field1\" size=\"5\" name=\"".$field['attr_pagevar']."1\" value=\"".$default_width."\" onblur=\"totalprice();\" /> cm</span><br />";
$html .= $VM_LANG->_('PHPSHOP_LENGTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field2\" size=\"5\" name=\"".$field['attr_pagevar']."2\" value=\"".$default_lenght."\"  onblur=\"totalprice();\" /> cm</span>";
$html .= "<input  name=\"".$field['attr_pagevar']."\" type=\"hidden\"  readonly=true />";
} else {
$html .= $VM_LANG->_('PHPSHOP_LENGTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field1\" size=\"5\" name=\"".$field['attr_pagevar']."1\" value=\"".$field['attr_post_value']."\" /> cm</span><br />";
$html .= $VM_LANG->_('PHPSHOP_WIDTH',false)." <span class=\"inputbox\"><input type=\"text\" class=\"inputbox\" id=\"".$field['attr_pagevar']."_field2\" size=\"5\" name=\"".$field['attr_pagevar']."2\" value=\"".$field['attr_post_value']."\" /> cm</span>";
Look for
Code: [Select]
size=\"5\" , and change to whatever value you like.
If you want to style them, I placed them in
Code: [Select]
<span class=\"inputbox\">, you can change that to whatever you like - and write the corresponding CSS code in your template!
Have fun!
Title: A product is added to cart eventhough the uploaded filetype is not supported !!!
Post by: kokowawa on March 15, 2010, 03:21:31 am
Hello All,

I'm using the "Custom Attributes Extended Hack". In the custom attributes for a product I set the upload to allow specific files to be uploaded, but when an unsupported file format is uploaded the checkout process shows this message:

Error: File Type of file "FILE_NAME" is not Supported

and then under that message it mentions:

Info: The product was added to your cart.

So its basically adding the product to the cart without the uploaded file because its not supported.

How can I make it to stop adding products to the cart if the files uploaded is larger than the set value or the files are not a supported format?

I tried search but didn't find good info maybe am not using the right keywords.

Here's few responses I recieved by posting in general questions but they told me to post here since i'm using extended hack: http://forum.virtuemart.net/index.php?topic=68378.0

Thanks for all the help.

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: iskye81 on April 30, 2010, 18:00:06 pm
Hi all,

Just discovered a problem with custom attributes after an order came through.  I'm using the word count function to calculate price and if a comma is included in the text it completely removes the calculated word count price from the shopping basket.  Also happens for semi-colons, and possibly other characters as well.

Has anyone else encountered this and is there a solution?  I can't really be asking customers not to include commas in their submitted text!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on May 10, 2010, 11:27:41 am
Commas, semi-colons and couple of other characters have special Java and/or PHP operators, these should be threated in the code of the hack to not produce the problems you  experienced. I'm not the author of that part of the hack, but later I can take a look to that. I'm just overwhelmed currently with commercial assignments.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: RubberSoul on May 19, 2010, 07:35:14 am
Hello,
   This hack is amazing! I needed to use VM for a restaurant with online ordering and I would not have been able to do it with out this hack. I have not completed the store yet but so far all of my testing has been successful. I do have one very small issue that I am hoping to find some insight on. I am using Joomla 1.5 and VM 1.1.3  Any help that someone could offer would be great.

When using radio select for sizes I get an extremely large amount of space between choices (see pic).

I would also like to say that I contacted Webgobe last week regarding a possible change in this hack to accommodate some extra functionality I also needed to implement. The response was very quick and he was more than willing to do my custom work for a reasonable price. This is one dedicated programmer. Thanks for the great hack and the equally great support and thanks to all who have contributed!



[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on May 19, 2010, 09:34:03 am
If you take a look to /administrator/components/com_virtuemart/classes/ps_product_custom_type.php, you will see (around line 195) that the radio buttons are encapsulated in a div:
Code: [Select]
$html .= "<div class='radio_box' style='border: 1px dotted #CCC; margin: 2px; padding: 2px; float: left;'>"; // Style
The exact code depends on the subversions of the hack, but the idea is the same. To solve your problem, you can do couple of things:
and I'm stopping here.
I hope you got the idea ;)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: RubberSoul on May 19, 2010, 10:41:34 am
Webgobe,
  I adjusted the height through the PHP and it worked out great. Thanks for the quick help.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: Di on June 13, 2010, 17:47:48 pm
*sobs piteously into my cuppa* can anyone help? I noticed someone asked this a while back but I could not find an answer... I have Joomla 1.5.17 and latest VM, with hacks uploaded...

I need the syntax for a calendar for picking delivery dates...

Thank you in advance...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on June 14, 2010, 09:25:49 am
Code: [Select]
Delivery date(date)(tip here|location)(|);
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: druscila on October 02, 2010, 03:38:26 am
Can i add an image above the radio button with this hack?  :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 02, 2010, 11:17:07 am
Yes. You can. But you need to get your hands dirty with code. But don't be afraid: you will need  to edit only one line in ps_product_custom_type.php.
Locate this line (line 202 in the latest package)
Code: [Select]
            $html .= "<input type=\"radio\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"$titlevar\" value=\"".$base_var."\" ". $checked ."/><br />".$show_value;and replace it with this one:
Code: [Select]
            $html .= $show_value."<br /><input type=\"radio\" class=\"inputbox\" id=\"".$titlevar."_field\" name=\"$titlevar\" value=\"".$base_var."\" ". $checked ."/>";Make backups first, use at your own risk, blah, blah, blah...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: flo82000 on October 04, 2010, 09:57:49 am
After you install the excellent hack "custom attribute" I think created by Barnett. I managed to see thumbnails for my choice of options (see attached jpg1)

1) On the other hand I stumble like crazy on the layout of the custom attribute. Unable to store all this correctly. I attached the photo jpg1 (from what I obtain) and jpg2 (that to which I tend to lead).

2) Ideally I would also hope that the customer can by choosing a number of medals, see the selection of medals and engravings added after this selection
See what is done here: http://www.melieetcie.fr/medaille-co...nt/p130/59/0-0

In short I need your lights! I have no idea, it's not because they have looked everywhere!

[attachment cleanup by admin]
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 04, 2010, 10:21:06 am
First of all, 2 questions:
a. The number of medals. This supposed to be different from the number of ordered products? If yes, should this choice have any impact on the final price of the resulted product? Right solution exist for all above possible situations, but depends on your answers.
b. styling/arranging the layout. Chances are that you can obtain the desired look by tweaking your VM template's theme.css file.
Send me a link to the actual page if you want a concrete tip on what to do.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: flo82000 on October 04, 2010, 15:31:16 pm
My English is not very good, it is possible that it is distorted my words. Actually I hope my list is properly attribute row, not one after another.
Second, when a customer chooses to have 5 medals for example, at the time, plus the choice of a medal and the choice of the etching member.

Finally, is it possible to display an image?
Below is my code :
Couleur du lien(radio)(|)(Gris|images/stories/Liens/anthracite.jpg,Bleu|images/stories/Liens/bleu.jpg,Bleu gris|images/stories/Liens/bleu gris.jpg,Bleu Roi|images/stories/Liens/bleu roi.jpg,Brun|images/stories/Liens/brun.jpg,Chair|images/stories/Liens/chair.jpg,Marron|images/stories/Liens/marron.jpg,Noir|images/stories/Liens/noir.jpg,Rose|images/stories/Liens/rose.jpg,Rouge|images/stories/Liens/rouge.jpg,Taupe|images/stories/Liens/taupe.jpg);Médaille n°1(radio)(|)(Coeur*|images/stories/Formes breloques/coeur.jpg,Petite Fille|images/stories/Formes breloques/petite fille.jpg,Ronde|images/stories/Formes breloques/ronde.jpg,Ovale|images/stories/Formes breloques/petite fille.jpg);Gravure Recto(textarea)(|)();Gravure Verso(textarea)(|)();
Médaille n°2(checkbox)(|)(Coeur,Petite Fille,Ronde,Ovale);Médaille n°3(checkbox)(|)(Coeur,Petite Fille,Ronde,Ovale);Médaille n°4(checkbox)(|)(Coeur,Petite Fille,Ronde,Ovale);Médaille n°5(checkbox)(|)(Coeur,Petite Fille,Ronde,Ovale)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: iskye81 on October 05, 2010, 15:58:22 pm
Hi all,

Just discovered a problem with custom attributes after an order came through.  I'm using the word count function to calculate price and if a comma is included in the text it completely removes the calculated word count price from the shopping basket.  Also happens for semi-colons, and possibly other characters as well.

Has anyone else encountered this and is there a solution?  I can't really be asking customers not to include commas in their submitted text!

So, was a solution ever found to this problem?  If things like commas have special PHP/Java Properties what can I do in the code to prevent this from happening?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 05, 2010, 16:29:22 pm
Not too much. The entire hack relies on  commas, semicolons, pipes and other valid PHP  delimiters and special characters. The situation isn't hopeless, in the moment of capture the entered text can be "prepared" with some coding skills. But isn't a 2 click thing, because the text entered this way will be passed around, including in the cart, and must to remain comprehensive. But if you want to take the risk, here's the code you must change:
Locate the * Text element class in the code (around line 757 if you use the latest version.
Go to function customTypeProcess, beginning at line 820.
The current, collected string is in the variable $value. see how is processed, and eliminate the failure points.
If you reach a stable solution, let us know!
I'll be happy to include in the package.
BTW, you should do the same for the textarea class too!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: iskye81 on October 05, 2010, 17:01:13 pm
Thanks for the reply. Hmm, I might take a look at this although don't know how far I'll get. Could the user just be prevented from entering the characters concerned, or would that require even more coding?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 05, 2010, 18:03:41 pm
You need to built a validation routine - may be even more complicated...
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: flo82000 on October 06, 2010, 13:24:41 pm
Do you know how to insert an image instead of the line for this syntax:
Name (line) (tip-here | field-below) (custom code line);

I tried this, but without success:

(Line )(|)( images / stories / fruits.jpg);
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 06, 2010, 13:27:19 pm
No, that won't work. That attribute was poorly implemented in the past, and you can insert only practically a horizontal rule tag with it, nothing else works.
The code need to be rewritten for that or new attribute implemented for inserting images.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: geovladimir on October 11, 2010, 10:18:09 am
 ???Help please. Very necessary hack. I enter (in the Russian roubles):
OAF (checkbox) () (Widows [+123456.00], Orphans [+126455.00])
Result:
 
OAF:
Widows (+123.00 руб.)
Orphans (+126.00 руб.)

Hack cuts off the sum, remains only three figures.
Joomla Версия 1.5.20
VirtueMart 1.1.5 stable
vm112_custom_attribute_extended_2.15
 ???
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 11, 2010, 10:26:36 am
Vladimir, download the latest and report back if you still have problems. You use an old, outdated version of the hack.
The latest is available there, the versions are different only by the available attributes, you can use any of them.http://www.webgobe.ro/en/downloads/component-hacks.html (http://www.webgobe.ro/en/downloads/component-hacks.html)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: geovladimir on October 11, 2010, 10:55:55 am
Thanks for the instant answer! Has downloaded customattributesextendedwindow. Has replaced files on a server. But it is not successful. Hack continues to cut the prices to 3 figures. :(
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 11, 2010, 11:14:02 am
Aha. Ok, It's a known issue and I thought I added the fix to the available package.
Will get back to you as I made the required change!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 11, 2010, 11:16:04 am
BTW, the solution is also up there in the forum somewhere LOL.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: geovladimir on October 11, 2010, 11:45:07 am
The goods with Custom Attributes not to be added in a basket! :o
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 11, 2010, 11:49:22 am
A quick (and dirty) fix:
open ps_product_custom-type.php.
Search for
Code: [Select]
         $price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($price * (1 + $tax_rate),2));Replace with
Code: [Select]
           $price_with_tax=$CURRENCY_DISPLAY->getFullValue($price * (1 + $tax_rate));this removes the price conversion to 2 digit decimals.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: geovladimir on October 11, 2010, 12:04:42 pm
Yes! Thanks! Now does not cut. But in a basket to put does not give!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 11, 2010, 12:27:37 pm
That must be some other thing, anyway, your syntax is a bit faulty: the |'s are mandatory!
try to use
Code: [Select]
OAF (checkbox) (|) (Widows [+123456.00], Orphans [+126455.00])with this syntax works for me!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 11, 2010, 12:51:42 pm
Hack updated with the fix above, and also a new attribute added - now you can add headings within attributes, like there: http://www.kadkitchenandbedroom.co.uk/ (http://www.kadkitchenandbedroom.co.uk/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage_carcass.tpl&Itemid=53&category_id=97&product_id=1197)
Read the added TXT file available in the package on how to use it! As I will have time, I can promise an update to the PDF too, but I'm still busy to make some money needed to survive  :-\.
You can download it, still free of charge from this location:
http://www.webgobe.ro/en/downloads/component-hacks.html (http://www.webgobe.ro/en/downloads/component-hacks.html)
Any feedback - and any small amount donated - is highly appreciated! (See below  the link if you want to donate.)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: geovladimir on October 11, 2010, 13:43:29 pm
That must be some other thing, anyway, your syntax is a bit faulty: the |'s are mandatory!
No, the reason not a symbol |. Without this symbol too all works. The matter is that I used in syntax of a word in Russian. It hack does not accept. It is very a pity. :'(
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on October 18, 2010, 08:45:28 am
Guys, a problem discovered in the CAE, see this post:
http://forum.virtuemart.net/index.php?topic=77119.msg256770#msg256770 (http://forum.virtuemart.net/index.php?topic=77119.msg256770#msg256770)
The problem is fixed in the version available on my site, if you think your site may be affected, then re-download it, and upgrade your ps_product.php.
The bug affects only sites which are using child products and shopper group discounts - so may be only a few sites having this problem.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: koaconsulting on October 20, 2010, 00:32:21 am
Overall this really seems like a great mod, however we cannot get it to work now that we've upgraded to your most recent version.  Once you click the "Add to Cart" button we just get a blank page with no error message or code generated.

We are using the newest stable version of Virtuemart (1.1.5) and the files you have in your zip file are from a MUCH older version of VM.  Is there any chance you can migrate the mod over to Virtuemart 1.1.5?

For example I'm looking at the ps_product.php file.  The version you include says "@version $Id: ps_product.php 1599 2009-01-08 19:05:51Z soeren_nb $" and the version in the latest VM release says "@version $Id: ps_product.php 2286 2010-02-01 15:28:00Z soeren_nb $".  A LOT has changed in your modified files in the past year and I have a feeling the problems we're having are related to us trying to port over pieces of the code.

We could really use your functionality but it just doesn't seem to work with VM 1.1.5.  Anything you can do to help would be greatly appreciated.

Note: after tracing through the code it seems to hang while recursively making the following call (ps_product_attribute.php):

$_SESSION['charge'][$d['prod_id']]=$charge;

Also the custom attribute text we are using is the following:
Code: [Select]
Invitation(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Invitation Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Response(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Response Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Details Insert(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Details Insert Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Custom Map(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Custom Map Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Color(select-r)(|)(Sand & Colbalt,Lime & Graphite,Mist & Graphite);Event Date(date);Cost(number)(|)(1|1)

Thank you.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: iskye81 on November 17, 2010, 16:54:50 pm
Not too much. The entire hack relies on  commas, semicolons, pipes and other valid PHP  delimiters and special characters. The situation isn't hopeless, in the moment of capture the entered text can be "prepared" with some coding skills. But isn't a 2 click thing, because the text entered this way will be passed around, including in the cart, and must to remain comprehensive. But if you want to take the risk, here's the code you must change:
Locate the * Text element class in the code (around line 757 if you use the latest version.
Go to function customTypeProcess, beginning at line 820.
The current, collected string is in the variable $value. see how is processed, and eliminate the failure points.
If you reach a stable solution, let us know!
I'll be happy to include in the package.
BTW, you should do the same for the textarea class too!

Hi again, well I'm afraid this is completely beyond me with my php experience at the moment.  If anyone comes up with a solution for this do let me know.  In the meantime I'm going to have to stick with the rather crude workaround of telling customers not to include certain characters in the submitted text.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on November 17, 2010, 17:53:07 pm
Overall this really seems like a great mod, however we cannot get it to work now that we've upgraded to your most recent version.  Once you click the "Add to Cart" button we just get a blank page with no error message or code generated.
Try to use some example syntax to see if it's working. Often a minor syntax error in the custom attributes can wreac havoc. The code has no protection against typos, reserved PHP characters and other such things.
Is a HACK - result of cumulative work of 10+ people. No guarantees ;)
We are using the newest stable version of Virtuemart (1.1.5) and the files you have in your zip file are from a MUCH older version of VM.  Is there any chance you can migrate the mod over to Virtuemart 1.1.5?

For example I'm looking at the ps_product.php file.  The version you include says "@version $Id: ps_product.php 1599 2009-01-08 19:05:51Z soeren_nb $" and the version in the latest VM release says "@version $Id: ps_product.php 2286 2010-02-01 15:28:00Z soeren_nb $".  A LOT has changed in your modified files in the past year and I have a feeling the problems we're having are related to us trying to port over pieces of the code.

We could really use your functionality but it just doesn't seem to work with VM 1.1.5.  Anything you can do to help would be greatly appreciated.
Two things: a. - the most important - code is working with newer VM, I have at least 10 sites with the code you can download on top of VM 1.1.5.
b. - If I will have the time - or I will got a project wich implies the upgrade to 1.1.5 - I will port he hack over 1.1.5 too, and you - and all other VM people - will get it for free.
But as is right now, I guess you must wait for that. I'm living EXCLUSIVELY from freelancing. I need to put first of all milk and bread on the table. Then I can code for fun (and I will).
Note: after tracing through the code it seems to hang while recursively making the following call (ps_product_attribute.php):

$_SESSION['charge'][$d['prod_id']]=$charge;

Also the custom attribute text we are using is the following:
Code: [Select]
Invitation(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Invitation Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Response(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Response Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Details Insert(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Details Insert Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Custom Map(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Custom Map Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Color(select-r)(|)(Sand & Colbalt,Lime & Graphite,Mist & Graphite);Event Date(date);Cost(number)(|)(1|1)
Weird. Your custom attribute works perfect on a fresly baked Joomla 1.5.22 with latest VM 1.1.5 and the hack downloaded from my page and applied to the above mix.
Did you overwrote everything? Do you use the default VM template? If not, you must hack the VM template you use too!!
These are the most common problems.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: kasssim on January 07, 2011, 08:43:59 am
please advise if this hack is working and where can i download it from ?

thanks

i want a Custom Attribute List showing a calendar
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: kasssim on January 07, 2011, 09:17:52 am
thanks for the reply,

which one should i download as there are 2 mentioned.

can you also advise steps or should i follow the ones listed on the start of this post ?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 07, 2011, 13:02:39 pm
The one WITHOUTH "window blinds, windowsill" etc in his name - that's the more recent.
You need to upload the content of the package to your server and OVERWRITE the existing files. Files are arranged as they are in the server, so it's a simple step. Overwriting everything is mandatory. Documentation is also in the package.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: kasssim on January 07, 2011, 14:22:53 pm
from your site am not getting the activation link
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 10, 2011, 09:49:18 am
For everyone interested in the hack: check this thread, please!
http://forum.virtuemart.net/index.php?topic=39666 (http://forum.virtuemart.net/index.php?topic=39666.msg265092#msg265092)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: luckysoft on January 13, 2011, 13:13:27 pm
Hello all,
I have read all posts about this hack but can't find a solution to my problem :(

The problem starts when a product has two or more attributes, when i select one attribute and than hit the "add to cart" button it works well, but when I select two different attributes (not within the same attribute) I'm not able to add the product to the cart.

The strange part is that it works the first time i visit the site, but after that no more :(

This is what i have done:

attribute 1(checkbox)(tip here|title-hover)(option 1 [+5.00],option 2 [+10.00]);
attribute 2(checkbox)(tip here|title-hover)(option 3 [+5.00],option 4 [+10.00])

When i remove the cookie from my browser i can select all the options/attributes and add the product to my cart once, after that I'm not able to, only if i select one or two options within the same attribute.

(http://www.mook-dekker.nl/afbeelding-web/Image4.png)

(http://www.mook-dekker.nl/afbeelding-web/Image2.png)

(http://www.mook-dekker.nl/afbeelding-web/Image3.png)

(http://www.mook-dekker.nl/afbeelding-web/Image1.png)

I'm really hoping that someone here has a solution for me, I'm desparate :):)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: sagarsagar on January 16, 2011, 00:54:11 am
will any one please help me,,
i have a website,, and i tried a lot,, to do chages in code,, but everytime it gives error,,,
will anyone please help me!!!
i am need of favour,, please help me out..
i am attaching mine CLASSES folder.. will anyone tell me,, or do the necessary changes,,

you guys are technically brilliant ,, so just asking for help!!

http://www.restrobiz.com/classes.zip
please help me out...
please..
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 17, 2011, 10:12:27 am
Ok, ok, We're here to help you... but what you want do do :)
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: casparbanis on January 19, 2011, 20:49:36 pm
I'm also having some trouble with the layout of my custom attributes.
I'm trying to get the radio-input above the image. Now I get the radio with text on the right of the image.

I tried to find it in the theme.css but I can't find it.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 20, 2011, 09:25:37 am
It's hard-coded in the hack's files - don't ask me why, I found it already this way.
You need to find the corresponding code in ps_product_custom_type.php and do your changes there.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: casparbanis on January 20, 2011, 15:40:08 pm
Thank's! I will give it a try
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: sagarsagar on January 22, 2011, 01:03:19 am
WILL YOU GUYS PLEASE HELP ME!!!..
JUST SHOW ME HOW TO ADD CHECK BOX OR TO MODIFY A LAYOUT..
will any one please help me,,
i have a website,, and i tried a lot,, to do chages in code,, but everytime it gives error,,,
will anyone please help me!!!
i am need of favour,, please help me out..
i am attaching mine CLASSES folder.. will anyone tell me,, or do the necessary changes,,

you guys are technically brilliant ,, so just asking for help!!

http://www.restrobiz.com/classes.zip
please help me out...
please..
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 22, 2011, 11:11:52 am
Hey, if you want help, tell us, what you want to achieve. We're wizards ;) but we can guess what you want. Ask concrete things - and you will got (probably) concrete answers!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: sagarsagar on January 23, 2011, 00:04:42 am
for example , i have a sandal.
the customer can place multiple orders
the product are segregated to lot of 10 pieces, lot of 20 and lot of 30
then he can add color size and shape to individually lot,,
that's it..
the product cost does not matter,, as these prices are negotiable,, only it has to be added in cart.
http://restrobiz.com/original.jpg
http://restrobiz.com/please-help-me.jpg

please pleas please help me,
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: offman on January 26, 2011, 19:15:42 pm
does works on VM.1.1.6 JM 1.1.22?
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on January 26, 2011, 19:22:08 pm
This version I'm not sure, Check the other thread:
http://forum.virtuemart.net/index.php?topic=39666 (http://forum.virtuemart.net/index.php?topic=39666)
The version posted there works
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: blueargylemedia on March 21, 2011, 19:31:42 pm
I have a question for anyone who can help pleeeease.  I have been using this hack on a few sites and it works great but I have run into something I don't know how to fix.

If I try to give a price of (+1000.00) it turns into $1.00.  It also turns into $1.00 if I use (+1000).  (+999.00) works just fine but this fundraiser is all set up with promotional goods printed, etc. I can't do $999 and this item needs to go live this week.

Any ideas?  Thanks!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on March 21, 2011, 19:47:20 pm
Check the other thread (two messages above). The problem has been fixed long time ago. You must be using an old version of the hack. This version is no more supported.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: mbester on April 19, 2011, 20:13:09 pm
Hello

I need urgent assistance (willing to pay if needs be).  I took over a site with your hack installed. Everything seemed to be working fine. I then picked up that adding an item to the cart works fine but when you try to add another, nothing happens, it doesn't respond at all.

Please let me know if you have seen this before and if it is "fixable".  The link to one of the products is http://www.kidstickers.co.za/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=12&category_id=12&option=com_virtuemart&Itemid=209&vmcchk=1&Itemid=209

Many Thanks
Martin
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on April 20, 2011, 08:39:31 am
Should be doable. I think is a minor settings problem there. Send me the credentials in a PM.
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: djserjey on November 16, 2011, 18:43:15 pm
Hi

the hack work fine, but when I add Donation(price)(please enter donation|title-below)(10.00|+) in Custom Attribute List:
start my problems, the field is display cut in the site, I can add or process, msg nfo: To add this product into your cart you have to select a product variant on the details page.
Im really lost in set up, can you help me please!

Regarsds
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: webgobe on November 16, 2011, 18:55:52 pm
This thread is dead, as you can see, the actual one - for a while is this:
http://forum.virtuemart.net/index.php?topic=39666.new;topicseen#new
You might use an outdated version, don't made the install correctly (did not overwrote all the files for example) or you don't use the default template. The failure points above are causing 99% of problems similar to yours.
Post any further questions on the  newer thread, please!
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: djserjey on November 16, 2011, 19:05:09 pm
thanks, i will do it!
Regards
Title: Re: Custom Attributes Extended 2.1 [Hack]
Post by: t210021 on November 22, 2011, 04:09:18 am
thanks, i will try to do it now