Jump to content

Problem with shopping cart sessions


omelette

Recommended Posts

I have been recently trying to set up an online shop using a free shopping cart package (Shop Script).  I set this up on my personal website to test it out and there were no visible problems.  The person I am making the site for then decided they would prefer to use Lycos eshop instead.  Once the package had been purchased it was found that it did not meet our requirements so I transferred the shop script cart over to this space.

I now found that the shopping cart is randomly filled with items from time to time, there is no apparant pattern to when this occurs only that the items added are items that were earlier added to the cart.

From what I can tell it appears that when I empty the cart, the session is cleared but then when I load a page, data is being put back in to the session!

I am using PHP version 4.3.9.  Lycos seem to have disabled a few PHP functions, (sessions are not on of them) not sure if this has anything to do with it.

Does anyone have any idea what the problem is and a possible solution.

Thanks.
Link to comment
Share on other sites

To me sounds like the session is being set empty and not actually getting destroyed.

I think I have something like this happen.  Could never figure out why I still have a shopping cart but it showed that it was empty.  I had a check if my shopping cart session was non-existant it would not even show up.

Until I added things into my cart it would tell me things like 'Your Shopping Cart has 3 item(s)'.  When i went to remove it it would keep saying 'Your Shopping Cat has 0 item(s)'.

So I had to make sure I was unsetting the particular session I was using for the shopping cart and that seemed to of fixed it.
Link to comment
Share on other sites

So would that involve destroying the session or unsetting the particular variables in the session? 

I am a bit reluctant to destroy the session whenever the shopping cart is emptied because I think this will get rid of other variables from the session that will still be needed, i.e. login information.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.