View Single Post
  #21  
Old 05-26-2008, 10:23 PM
 
xsurf xsurf is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 56
 

Default Re: The universal solution "Continue Shopping Button"

Well, I finally got around to trying this, and it doesn't work for me, despite having 4.1.9 .
Admittedly, x-cart is installed only as my shopping cart (so the actual "add to cart" button is clicked on from a page outside x-cart, and only then x-cart is entered, directly into the shopping cart) but still I would have thought HTTP_REFERER would contain the correct value?
Yet back_url always ends up being https://www.mysite.com/xcart/cart.php?keep_https=yes

The code I used was
PHP Code:
x_session_register("back_url");
if (
$mode == "add" && strpos($_SERVER['HTTP_REFERER'], "cart.php")>)
{
    
$back_url $_SERVER['HTTP_REFERER'];
}
$smarty->assign("back_url"$back_url); 

And
PHP Code:
<a href="{$back_url}"><img src="{$ImagesDir}/ContinueShopping.gif" border="0" align="absmiddle" alt="Continue Shopping"></img></a
__________________
X-cart Gold 4.1.12
One Page Checkout
CDSEO Pro
Smart Search
PHP 5.2.5
FreeBSD
Reply With Quote