Developer forum

Forum » Ecommerce - Standard features » Cart gets replaced when session times out

Cart gets replaced when session times out

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

We have som problems in a solution where a logged in customers cart gets replaced by the anonymous cart when session times out.

The "Merge the anonymous cart content with the cart saved on the user when logged in" is checked.

We do the adding to cart with a AJAX call that posts for example : https://www.magnusson-freij.se/cartservice?productid=41010&cartcmd=add&quantity=1&UnitID=P%C3%85S&redirect=false

I talked the support and was told that developes are looking into it. 

DW Version : 9.6.5

Does anyone maybe have a workaround until it's fixed? We also need to support non logged in adding to cart. 

Regards / Aki

 

 

cart-setting.png

Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Aki,

Have you tried to use auto login in your login template? Then the user is automatically logged in again if the session expires.
See example here https://doc.dynamicweb.com/forum/cms-standard-features/cms-standard-features/remember-me-on-login

Best regards,
Morten

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi Morten,

Actually no, not in this solution. It propably might help in some cases. But lot's of users have the behaviour of leaving their browser open when they do other stuff and then returning and continuing from where they left. And if they click on a "Buy"-button the cart gets replaced.

But it might be a good idea to implement it to narrow down the the users that experience this. 

Regards / Aki

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Your cart session timeout is set to 0 - set it to 1440 (24 hours). We did make some changes related to this in latest 9.6 releases. We have no open items related to this - checkout the bug lists.

BR Nicolai

Capture.PNG
Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Thanks for the tip. Will try it tomorrow. 

Regards / Aki

 

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Looks like that did the trick. At least now I cannot reproduce the error so it look very promising. Thanks.

Regards / Aki

 

 
Nicolai Pedersen
Reply

Great - glad to hear!

 

You must be logged in to post in the forum