VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: blackdream on February 25, 2013, 12:58:03 PM

Title: Continue Shopping
Post by: blackdream on February 25, 2013, 12:58:03 PM
hello
I have read several topics in the forum on continue shopping, but everyone wanted a custom page, I would just go back to the article in question.
thanks


Virtuemart 2.0.19
Joomla 2.5.9
Title: Re: Continue Shopping
Post by: jenkinhill on February 25, 2013, 17:47:15 PM
This is a core hack - so must be redone each time VirtueMart is updated.

In joomla_root/components/com_virtuemart/controllers/cart.php  find

$this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';


replace with

$this->json->msg = '<a class="continue" href="javascript:history.go(0)" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
Title: Re: Continue Shopping
Post by: blackdream on February 25, 2013, 19:11:29 PM
Perfect!!!
Thanks for the great code!!!
Title: Re: Continue Shopping
Post by: holanpan7 on February 28, 2013, 21:35:29 PM
Thanks!.
It works but my cart doesn't get updated until I refresh.
Title: Re: Continue Shopping
Post by: ingmardevos on May 02, 2013, 20:42:00 PM
I know its been a while since this post, but for people stumbling upon this page, this will also refresh the page so the cart will be updated.

file: root/components/com_virtuemart/controllers/cart.php

Replace line 117: $this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';

With: $this->json->msg = '<a class="continue" href="javascript:document.location.reload(true)" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
Title: Re: Continue Shopping
Post by: oldbarn on May 28, 2013, 19:59:28 PM
I inserted the code (both ways) and it still redirects me. Any other suggestions?

Here is a link to a test product. If you add to cart and press continue shopping you will see that it still redirects away from current page.