View Single Post
  #23  
Old 05-27-2008, 12:34 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 xsurf
Ah, never mind, fixed it! Looks like it's working for me now - I changed
PHP Code:
if ($mode == "add" && strpos($_SERVER['HTTP_REFERER'], "cart.php")>

to

PHP Code:
if ($mode == "add" && (strpos($_SERVER['HTTP_REFERER'], "cart.php") == false)) 


PHP Code:
if ($mode == "add" && (strpos($_SERVER['HTTP_REFERER'], "cart.php") == false)) 


similarly

PHP Code:
if ($mode == "add" && (strpos($_SERVER['HTTP_REFERER'], "cart.php") == 0)) 


Because if you want to add conditions when the line does not contain some substring, you should write to verify "strpos($_SERVER['HTTP_REFERER'], "cart.php") === false" result for this function.
Reply With Quote