News:

Support the VirtueMart project and become a member

Main Menu

Continue Shopping

Started by blackdream, February 25, 2013, 12:58:03 PM

Previous topic - Next topic

blackdream

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

jenkinhill

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>';
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

blackdream

Perfect!!!
Thanks for the great code!!!

holanpan7

Thanks!.
It works but my cart doesn't get updated until I refresh.

ingmardevos

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

oldbarn

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.