Problem with shopping cart sessions
Posted 08 August 2006 - 08:43 PM
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.
Posted 08 August 2006 - 10:57 PM
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.
This post was brought to you by DynamicShark Media
[For Hire] - Small PHP Projects - Script Fixing, Development, WordPress
Read My Blog: www TylerIngram dot Com
Follow Me On Twitter
Posted 09 August 2006 - 12:03 PM
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.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users