News:

Support the VirtueMart project and become a member

Main Menu

Selected custom field in Added to cart popup?

Started by d0ublezer0, July 22, 2015, 07:43:40 AM

Previous topic - Next topic

d0ublezer0

When we added product to cart popup will show only product name, but not show selected custom fields cart options (for just added product), like Color, Size , etc.
How possible to do this?

I tried to use $cartSession:
if(!class_exists('VirtueMartCart')) require(JPATH_VM_SITE.DS.'helpers'.DS.'cart.php');
$cart = VirtueMartCart::getCart(false);

foreach ($cart->products as $product)
{
var_dump($product->customfields);
}


But $cartSession does not contains customfields, before we go to full cart page.

Solution needed for VM2. But VM3 probably will be the same?

d0ublezer0

There is same attempts to change cart.php helper, in place, where he start cart session.
Same problem, like this topic:
https://forum.virtuemart.net/index.php?topic=120962.0