November Happy Hour will be moved to Thursday December 5th.

Creation of empty cart when browsing the site

Vote:
 

Hi,
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?

//Andreas

#91459
Oct 06, 2014 13:46
Vote:
 

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!

Regards.

/Q

#91477
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.