View Single Post
  #52  
Old 09-26-2008, 12:36 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: The universal solution "Continue Shopping Button"

Quote:
Originally Posted by glsp
My client requested that the visitor be returned to the last category they were viewing, rather than the last product or any other page. I decided to stick this near the bottom of my auth.php file so the last category info would follow the visitor around the site (removing the other code from cart.php):
PHP Code:
#
# Custom code: Continue Shopping link
#
x_session_register("last_cat");
$referrer $_SERVER['HTTP_REFERER'];
if (
strpos($referrer"home.php")) {
    
$last_cat $referrer;
}
else if (!
$last_cat) {
    
$last_cat 'home.php';
}
$smarty->assign("back_url"$last_cat);
# End Continue Shopping 

What should happen if the transition to the cart was made from the page - Manufacture, search or etc.?
Reply With Quote