View Single Post
  #48  
Old 09-21-2008, 08:02 PM
 
glsp glsp is offline
 

Member
  
Join Date: Dec 2007
Location: Northampton, MA
Posts: 27
 

Default Re: The universal solution "Continue Shopping Button"

I added a file "continue_shopping.tpl" in /skin1/buttons so I could use the Continue Shopping link at the top and bottom of my cart:
PHP Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping href="$back_url"

My store is straight forward, so the only pages a customer could come from that would make sense to return to are category pages and product pages, so in cart.php, I have:
PHP Code:
#
# Continue Shopping link
#
x_session_register("back_url");
$referrer $_SERVER['HTTP_REFERER'];
if (
strpos($referrer"home.php") || strpos($referrer"product.php"))
{
    
$back_url $referrer;
}
else if (!
$back_url) {
    
$back_url 'home.php';
}

$smarty->assign("back_url"$back_url);
# End Continue Shopping 
__________________
X-Cart Gold version 4.1.9

PS: This is what part of the alphabet would look like if Q and R were eliminated.
Reply With Quote