VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: aLioneL on March 20, 2017, 14:29:49 pm

Title: description product in cart / VM 3.2.0
Post by: aLioneL on March 20, 2017, 14:29:49 pm
Bonjour,
J had just update to VM3.2.0 (Joomla2.5.28)
and in my cart there are no description product anymore :-(
has someone an idea ?
Thanks by advance ;-)
LioneL (Southern France)
Title: Re: description product in cart / VM 3.2.0
Post by: Milbo on March 20, 2017, 15:13:53 pm
Are this descriptions done by string?

I fear we have a bug there. Open the customfield.php in sublayout ( /components/com_virtuemart/sublayouts) and replace the foreach ( foreach( (array)$product->customfields as $prodcustom){ ) around line658 with this

Code: [Select]
foreach( (array)$product->customfields as $prodcustom){

//We just add the customfields to be shown in the cart to the variantmods
if(is_object($prodcustom)){
if($prodcustom->is_cart_attribute or $prodcustom->is_input){
if(!isset($variantmods[$prodcustom->virtuemart_custom_id])){
$variantmods[$prodcustom->virtuemart_custom_id][$prodcustom->virtuemart_customfield_id] = true;
}
}
$productCustoms[$prodcustom->virtuemart_customfield_id] = $prodcustom;
}
}
Title: Re: description product in cart / VM 3.2.0
Post by: Pitpan on March 20, 2017, 16:06:14 pm
Do you plan an update to implement this?
Title: Re: description product in cart / VM 3.2.0
Post by: jenkinhill on March 20, 2017, 16:25:48 pm
As always with a new release there will be some issues which are not apparent until that version is installed by more general users. We are already testing VM3.2.1
Title: Re: description product in cart / VM 3.2.0
Post by: aLioneL on March 21, 2017, 14:02:08 pm
Merci Milbo ;-)
your modification is okay!
Title: Re: description product in cart / VM 3.2.0
Post by: kaybee57 on March 21, 2017, 22:27:49 pm
Are this descriptions done by string?

I fear we have a bug there. Open the customfield.php in sublayout ( /components/com_virtuemart/sublayouts) and replace the foreach ( foreach( (array)$product->customfields as $prodcustom){ ) around line658 with this

Code: [Select]
foreach( (array)$product->customfields as $prodcustom){

//We just add the customfields to be shown in the cart to the variantmods
if(is_object($prodcustom)){
if($prodcustom->is_cart_attribute or $prodcustom->is_input){
if(!isset($variantmods[$prodcustom->virtuemart_custom_id])){
$variantmods[$prodcustom->virtuemart_custom_id][$prodcustom->virtuemart_customfield_id] = true;
}
}
$productCustoms[$prodcustom->virtuemart_customfield_id] = $prodcustom;
}
}

Thank you Milbo - I can verify this works following the recent upgrade when the Custom fields disappeared.
Title: Re: description product in cart / VM 3.2.0
Post by: Milbo on March 22, 2017, 09:26:35 am
Do you answer me here?

His bug is a bit different, because he has no data displayed. It would be good when he implements the fix, so we know if it works then also. There is still the question with http://forum.virtuemart.net/index.php?topic=136666.msg479156#msg479156 he has a customfield too much. And our poster here has none. Hmm.
Title: Re: description product in cart / VM 3.2.0
Post by: bkotsias on May 30, 2017, 19:39:55 pm
Hello from Greece

this modification not working in version 3.2.2. Any idea ?