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

How can I control the "Continue Shopping" link?

Started by Greenhouse, February 10, 2012, 12:16:57 PM

Previous topic - Next topic

Greenhouse

My "Continue Shopping" link goes back to the same category. I'd like it to go back to the shop home page, with categories listed, etc. How can I change this link/destination??

tx

eldravo


I had the same problem, and finally found a solution:


Step 1.- Go to this file:
/yoursite/components/com_virtuemart/controllers/cart.php

Step 2.- Look for this piece of code:
         $this->json->msg = '<a class="continue" href="' . $continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
         $this->json->msg .= '<a class="floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';
         if ($errorMsg) $this->json->msg .= '<div>'.$errorMsg.'</div>';
         $this->json->stat = '1';
} else {


Step 3.- Change the href part for the link you would like to go:
          $this->json->msg = '<a class="continue" href="http://yoursitehere.com/yourshopfrontpagehere.com" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
          $this->json->msg .= '<a class="floatright" href="' . JRoute::_("index.php?option=com_virtuemart&view=cart") . '">' . JText::_('COM_VIRTUEMART_CART_SHOW_MODAL') . '</a>';
           if ($errorMsg) $this->json->msg .= '<div>'.$errorMsg.'</div>';
           $this->json->stat = '1';
} else {

Note: Be sure to copy and paste the link of your shopfront from your browser's address in order to avoid mistakes.

This worked for me. I found the solution from a similar post to VM1: http://forum.virtuemart.net/index.php?topic=44478.0

René Mendel

This is what i want but after trying and trying reading and reading and do it over again it will not work for me.

Joomla 1.5.26 VM 2.0.6 working it out on a localhost. And yes think i have read al there is written over continue shopping.

Please can some one help me out?

RFIDBob

Great tip. I have been working with this for a few days and I like the result. Any idea on what code would be needed to instead of taking you to the home page, but to just simply close the greybox window to let the use continue from the flypage they were just on? I basically would like to have the same effect when the user clicks Continue Shopping as they would have if they clicked off the box or clicked the X close window button at the top right.

i have already tried various combination of the following code substituted for the URL of the home page with no luck
<a href="JavaScript:window.close()">Close</a>


Any Ideas?
Vist our online RFID store at argowireless.com

Joao Ferraz

Quote from: RFIDBob on June 20, 2012, 21:55:11 PM
Great tip. I have been working with this for a few days and I like the result. Any idea on what code would be needed to instead of taking you to the home page, but to just simply close the greybox window to let the use continue from the flypage they were just on? I basically would like to have the same effect when the user clicks Continue Shopping as they would have if they clicked off the box or clicked the X close window button at the top right.

i have already tried various combination of the following code substituted for the URL of the home page with no luck
<a href="JavaScript:window.close()">Close</a>


Any Ideas?

Hi RFIDBob, did you find the solution?

WebStuff

#5
To return to(stay on) the same page you can create an override by copying [SITE ROOT]/components/com_virtuemart/views/cart/tmpl/padded.php and put it in [SITE ROOT]/templates/[YOUR TEMPLATE]/html/com_virtuemart/cart/padded.php
Then edit this file and at the top add:$continue_link = $_SERVER['HTTP_REFERER'];
$this->continue_link = $continue_link;

Just before:echo '<a class="continue" href="' . $this->continue_link . '" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
Please Note: padded.php was introduced in 2.0.22 or thereabouts but the principle is the same for [SITE ROOT]/components/com_virtuemart/controllers/cart.php