Developer forum

Forum » Ecommerce - Standard features » Cart removed on logout

Cart removed on logout

Nuno Aguiar
Reply

Hi,

 

I need Dynamicweb remove all cache/session carts, or at least "not remember" when a user log's in again.

 

I tried:

 - setting the "Days the cart is saved" to 0 (Administration Center > eCommerce > Advanced settings > General)

 - activating the checkbox "Create new cart when cart is being manipulated" (Administration Center > eCommerce > Advanced settings > Cart)

 

Despite all that, every time I login, I have my "old" cart still there. How can I prevent this? I need the system to forget it.

 

Nuno


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

There is no default for doing that.

 

You have to make a notification subscriber that reacts on user login or logoff that calls eCommerce.Frontend.Cart.CartCatch.ClearCart()

 

http://developer.dynamicweb-cms.com/api8/#Dynamicweb~Dynamicweb.Notifications.Standard+User~OnExtranetLogin.html

 

BR Nicolai

 

 

 

 

Votes for this answer: 1
 
Nuno Aguiar
Reply

Hi Nicolai,

 

This looks like a good enough solution for us right now.

 

Thanks.

 

You must be logged in to post in the forum