Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Creation of empty cart when browsing the site


I would like to know if its possible to stop the creation of an empty cart when a user access the site. If there is no cookie that makes the user reconizable, a new and empty cart is created. We would like to wait with the creation of the cart until the user actually puts something in it. Is that possible?


Oct 06, 2014 13:46

I'm not sure about the version you are using, but Commerce would not automatically create empty carts when user just browsing the site. It depends on implementation.

For example, this code will create an empty cart:

CartHelper ch = new CartHelper(Cart.DefaultName);

Then yes, it should be possible to wait for the creation of the cart!



Oct 07, 2014 4:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.