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!


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 '19 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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