VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: SilverApe on April 26, 2012, 14:33:46 PM

Title: was added to cart displaying 2 times
Post by: SilverApe on April 26, 2012, 14:33:46 PM
Hi,

When I add a product to my cart, the page displays the "was added to cart" message 2 times.
Can I correct this somewhere?

thanks in advance,
aaron Petrovic

http://d.pr/i/IwoD (http://d.pr/i/IwoD)
Title: Re: was added to cart displaying 2 times
Post by: teobgeno on April 26, 2012, 15:35:41 PM
at components/com_virtuemart/controllers/cart.php line 76-79


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


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

Title: Re: was added to cart displaying 2 times
Post by: SilverApe on April 26, 2012, 15:46:47 PM
Thanks, that was really really fast!  ;D And it worked.

thanks again, greetings,
Aaron