Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New customers not being re-directed to login page when trying to check out items - error message appearing x


Recommended Posts

Posted

Hi Everyone,

I'm having a lot of problems this morning and have done some investigation & discovered that,

what's happening is: If a customer is NOT logged in, and they try and write a review, or checkout from their shopping cart, - they SHOULD be redirected to the login page, because only logged in customers can do these things - but this isn't happening. Instead they're getting this error:

 

Fatal error: Call to a member function set_snapshot() on a non-object in /home/eveorgan/public_html/product_reviews_write.php on line 16

 

or this error:

Fatal error: Call to a member function set_snapshot() on a non-object in /home/eveorgan/public_html/checkout_shipping.php on line 16

 

I've looked at the files, and the code in question is this:

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

Does anybody see anything wrong there??? Why is it not re-directing them properly? Does everyone else's files contain the same code, or has mine been altered somehow?

If a customer is logged in, and tries to do those things, they function fine - so the issue is with the re-direction to the login page for new customers.

 

Please help!

Thanks everyone!

xox

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...