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.?