Is it possible to change the cookie timeout just for the cart? E.g. I'd like to clear abandoned carts after X hours and keep all the other sessions untouched (e.g. user sessions etc).

Please advise anyone!

1 Answer 1


Create a commerce.php config file in your config folder and set the cartCookieDuration to a time interval. The default is 3 months.

return [
    'cartCookieDuration' => 'P3M',
    'purgeInactiveCarts' => true,
    'purgeInactiveCartsDuration' => 'P3M',
  • Oh that's very helpful! Thank you!
    – biko
    Jul 25, 2019 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.