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

Continue Shopping link...

Started by Rookie232, September 18, 2012, 22:04:51 PM

Previous topic - Next topic

Rookie232

When you view cart you are given the option to continue shopping via a link. This link takes you to a category page or such. The site I am building is very straight forward and I would like the customer to go back to the store front page. Is there a way to change this link? Thanks!!!


chetanmadaan

Look into file:
[/b]For popup [/b]
JOOMLA_ROOT/components/com_virtuemart/controllers/cart.php (function) "addJS"

and search for variable "$continue_link" The link actually varies based on where you are... if you are in a category... it links to the category...

You may also look for function: prepareContinueLink in file "components/com_virtuemart/views/cart/view.html.php"

Rookie232

Thanks! I found the code that changes it but can not figure out what link to put there to get me back to where I need to be. I can get it to redirect to a number of pages but not the right one.

Here is a link to my test site can you discern what link I should add?  Thanks!


http://www.nebulacompany.com/Clients/cdc/index.php/order-online

Rookie232

Does anyone have an idea of the correct link for this workaround? Thanks!!

cmb

Apparently there is no mechanism within Joomla to override the \components\com_virtuemart\views\cart\view.html.php file directly.

Option A. Do a core hack and then reapply the changes every time you update VirtueMart.

Option B. The better method is to override \components\com_virtuemart\views\cart\tmpl\default.php. (The modified file will be at \templates\<mytemplate>\html\com_virtuemart\cart\default.php.) Then replace the code that references continue_link_html at line 70 of \components\com_virtuemart\views\cart\tmpl\default.php with the modified code lifted from the view.html.php file. In case there are conflicts, you'll have to rename the PHP variables.

I haven't tried Option B but as a test, I implemented the Option A core hack.

At or near line 170 of view.html.php you will find:
$continue_link = JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryLink);

I changed that to:
$continue_link = JRoute::_('index.php?option=com_virtuemart&view=virtuemart');

That links back to the VirtueMart front page.

VirtueMart 2.0.12b, Joomla 2.5.7
Charles