News:

Support the VirtueMart project and become a member

Main Menu

Different cart for same users

Started by anantmaks, January 23, 2018, 15:16:25 PM

Previous topic - Next topic

anantmaks

VirtueMart Version 3.2.12
----------------------------
To replicate: Open your store in two different browsers and login at the both end with same user. Now add some product in cart from browser1, and add some different product in cart from browser2. Reaching on cart page the same user is having different products in his/her cart at the same time. You can also try removing all products from user cart from browser1 and refresh the cart of in browser2 and you will see that it would still show products added into the cart for that user in the browser2.

As per my understanding, VirtueMart is updating user cart table from the session. So, for browser1 the user session cart is empty that updates the user cart table as empty. At the same time when page in browser2 is refreshed, it has some products in user cart session and so it again fills the user cart table with those products. And all this results in different cart for user.

This could be a flow of approach that how this e-commerce works. Though here we see major brands like - Amazon(world wide), Flipkart(India) who follows the approach of updating session from table, rather than table from session. You can try the same thing with your amazon account and you'll see the difference. There, cart is always shown same for one user at a time.   
Anant Garg
Ghaziabad, India

Studio 42

Shoppers  dont use 2 browser at same time, only a developer do this.
So i don't think,it's a problem.

anantmaks

Hi @studio42, firstly I already have said that "This could be a flow of approach that how this e-commerce works", and moreover its not about that if shoppers will not see it then this should remain as it is. It is saying like - "an error hidden means our system is bug free". I am here talking about how all e-commerce works and how VirtueMart is not following this concept.

And this thing will cause issue when we reach to level of APIs, like when we build an API by which VirtueMart store of a site can be accessed via mobile, and in those sessions don't expires. As you use may be using amazon app in your mobile, once you are login there, you remain login forever. And when you access same thing on web on your browser you get the same cart as you created via app user login. With VitueMart you'll surely going to have problem there.
Anant Garg
Ghaziabad, India