Thanks for your response.
So it looks like if I want to change the cookie expiration date, I would have to create a custom AddToCart widget and also a custom OrdersManager class, is that correct?
Shame the expiration date value is hard-coded , would be a useful editable setting...
The shopping cart cookie is created when a user first adds an item to their basket. Which of those events would fire for that? They all seem to be based around the order being placed and payment taken.
It seems overkill to have to alter the whole Add to Cart process just to amend the cookie expiration. I decided to add an HttpModule to intercept the response when the cookie was created and amend the expiration:
AmendShoppingCartCookieModule : IHttpModule
// nothing to do.
source, EventArgs e)
// If the request is setting the shopping cart cookie
var currentContext = HttpContext.Current;
// and the cookie expiration date is more than 2 days
var cartCookie = currentContext.Response.Cookies[
(cartCookie.Expires.Date <= DateTime.Now.AddDays(2).Date)
// update the cookie expiration
var newCartCookie =
Expires = DateTime.Now.AddDays(2)
and added the module in my web.config