Double message when adding product to cart

Change your online store into modern look with myStore eCommerce VirtueMart Joomla template - discussion forum.
GK User
Wed May 09, 2012 1:17 pm
Hi guys,

Im having an issue,

http://tablets.alvaromartins.info

When I add a product to cart I get a system message:

Product successfully added
Product successfully added

twice...

can you please help on this?

regards,

M
User avatar
Fresh Boarder

GK User
Fri May 11, 2012 6:06 am
Hi malvinho,

The same was happening on my site (esports template). Try this, it worked for me:

at components/com_virtuemart/controllers/cart.php line 76-79

Code: Select all
if ($cart->add($virtuemart_product_ids,$success)) {
            $msg = JText::_('COM_VIRTUEMART_PRODUCT_ADDED_SUCCESSFULLY');
            $mainframe->enqueueMessage($msg);
            $type = '';


If you look some lines below there is a $mainframe->enqueueMessage($msg); also at line 90 and that is why the duplicate system message.So there is no need for the first output to exist .Comment line 78 and it will be ok.Check below

Code: Select all
if ($cart->add($virtuemart_product_ids,$success)) {
            $msg = JText::_('COM_VIRTUEMART_PRODUCT_ADDED_SUCCESSFULLY');
            //$mainframe->enqueueMessage($msg);
            $type = '';


font: http://forum.virtuemart.net/index.php?topic=101761.msg337510#msg337510

;)
User avatar
Senior Boarder

GK User
Sat May 12, 2012 11:29 am
Thank you anaffelici! This works for me :)
User avatar
Fresh Boarder


cron