Jump to content
Sign in to follow this  
KongoCat

Sessions And Carts

Recommended Posts

Hi,

When I login and add products to the shopping cart and then login from another browser / computer I see that same shopping cart.

If I then make a change in one browser that change is not seen in the other browser.

It means that the logins get different sessions as expected and that the database is updated on each change but it is only read on login and saved on log out and on change.

Is that correct? should it work like that?

 

Share this post


Link to post
Share on other sites

It sounds like:

  1. Customer looks at site in Chrome, adds to cart, login, logoff.  Cart is saved.
  2. Same customer looks at site in IE, login, cart is restored, adds to cart.  DOES NOT LOGOFF
  3. Same customer goes back to Chrome, logs in, but the cart is as it was at #1

Is that the scenario?

 


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

Hi Burt,

Thank you for the help.

This is the scenario

  1. Customer logged in and looks at site in Chrome, adds to cart several items.  Calls husband to get an advise to add more stuff. (same as one users using 2 browsers)
  2. Husband logs in, cart is restored in his browser, he adds to the cart what he wanted.  DOES NOT LOGOFF.
  3. Wife doesn't see what he added to the cart.

That was first seen when a browser was left open and forgotten. Then I logged in in another browser and made changes to a cart. Then I went back to the first window and saw that what I added is missing and I was not aware that I was using 2 browsers. Maybe it was always like that.


This is an old install that can not move for the seen future to a new version for many reasons.

Share this post


Link to post
Share on other sites

What you describe there is a situation that I can see it happening, but the chances are remote.

Anyway:

12 minutes ago, KongoCat said:

it was always like that

I think so.

In your scenario:

  1. Customer logged in and looks at site in Chrome, adds to cart several items. 
    Calls husband to get an advise to add more stuff. (same as one users using 2 browsers)
  2. Husband logs in, cart is restored in his browser, he adds to the cart what he wanted. 
    DOES NOT LOGOFF.  If he had logged off here...
  3. Wife doesn't see what he added to the cart.
    Wife would need to log off and log in, cart would then show what the husband added.

I think. 

But it's such a far-fetched scenario...I cannot see it happening enough to want to try to fix the standard behaviour of the software.  


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites
2 hours ago, burt said:

If he had logged off here...

I don't think that would be necessary. 

She would have to log in again to see his changes.  I don't think logging off matters *except* that it allows to log in again.  I.e. I don't think anything happens at log off.  It's all at log in.  It updates the saved cart immediately but it only reads from it at login.  I'm thinking about what would be involved to check for that situation, and it doesn't seem trivial.  It might be that the easiest solution would be to stop storing the cart products and quantities in the session.  If they were always read from the database, then just refreshing the page would work. 


Always back up before making changes.

Share this post


Link to post
Share on other sites

Hi,

Thank you again for the support - 18 years a member here and it is always a pleasure to visit. 

To my issue, I have just seen that this happened on the same browser in same window.

I can only guess that it is related to recently we moved to php 5.6 from 5.4.

Does it make sense or ring any bells?

 

 

 

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  

×