News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

was added to cart displaying 2 times

Started by SilverApe, April 26, 2012, 14:33:46 PM

Previous topic - Next topic

SilverApe

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

teobgeno

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 = '';


SilverApe

Thanks, that was really really fast!  ;D And it worked.

thanks again, greetings,
Aaron