Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Sign in to follow this  

tep_session_register problem

Recommended Posts

I have been struggling with something all weekend. I thought it was the contrib I started using but literally I can have the following code in one source file:



if (!tep_session_is_registered('customer_is_guest')){

echo 'FOOBAR' . !tep_session_is_registered('customer_is_guest');



It will printout 'FOOBAR1' - How is that possible? Anyone with insight - it would be TREMENDOUSLY appreciated!


Thank you in advance,


Share this post

Link to post
Share on other sites

I tried the same code and it works.



Change this line:





if ( !tep_session_register('customer_is_guest') ) {
  echo '<br>Failed to register variable!<br>';

That includes a check to let you know if the register was successful or not.


The code you have just assumes it was successful.


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.


"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -


"Headers already sent" - The definitive help


"Cannot redeclare ..." - How to find/fix it


SSL Implementation Help


Like this post? "Like" it again over there >

Share this post

Link to post
Share on other sites

Did you set the variable $customer_is_guest ?

Otherwise just use the superglobal $_SESSION['customer_is_guest']. Works fine too.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this