Developer forum

Forum » Ecommerce - Standard features » Cart lost after session timeout

Cart lost after session timeout

Lars Larsen
Lars Larsen
Reply

Hi

I have a solution where the uses loses the cart when the session times out after 20 min. The user is not logged in. I think Dynamicweb will pickup the cart again if the session times out using the cookie "Dynamicweb:Ecom:Cart". But that cookie newer gets writtten to the client. Is this why the cart is lost, and why can it be that the cookie is not written to the client?

"Cart session timeout" in MC is set to 720

Running v9.6.9


Replies

 
Lars Larsen
Lars Larsen
Reply

Bump...

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Lars,

This can happen if you have selected the "Dynamicweb:Ecom:Cart" cookie in one of the categories in Cookie Manager.

Secure cookies: Will not be set, unless the user is accessing the website using https. Enabling "Secure all cookies" will have the same effect on any cookie.
Tracking cookies: Will not be set, unless the user accepts tracking cookies (or all cookies).
Custom category cookies: Will not be set, unless the user accepts that category (or all cookies).

 
Lars Larsen
Lars Larsen
Reply

Hi Morten

The cookie "Dynamicweb:Ecom:Cart" has not been selected in the Cookie Manager and the website is running HTTPS:

Capture.JPG
 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

It might be a "cookie security issue", like a wrong combination of secure and samesite value on the cookie.

You can try to enable "Secure all cookies" in Cookie Manager and see if the problem goes away.

You can also try this in Chrome developer tools (F12)...

  1. Reload the page (F5)
  2. Go to Network and find the response for the page. Does it have the expected Set-Cookie reponse header for the cart cookie?
  3. Go to Network and filter the responses by enabling "Has blocked cookies". Are there any entries on the list?
  4. Go to Application > Storage > Cookies > yourdomain.com and filter the cookies by enabling "Only show cookies with an issue". Are there any entries on the list?

If you can't find any issues then it might be a bug in DW which has already been fixed during the years that have passed since the release of 9.6.9 ;)
Try to upgrade to latest 9.12 and see if you can reproduce the issue.

Otherwise, I think you need to contact support, so that they can take a look at your website.

 
Lars Larsen
Lars Larsen
Reply

Hi Morten

Found out that I had not set the setting "SETTINGS - Ecommerce - Advanced configuration - Days the cart is saved"..... my bad

 

You must be logged in to post in the forum