I'm having a trouble with my Magento 2 store. I need to clear all items of users carts programmatically.
If user don't purchase his cart, it'll be cleaned.
Do you have any idea of how can i do that?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Byron, I guess that you need to clear the Abandoned Carts from your system. As per Abandoned Cart concept if A shipping cart is In-active is sudden time, then it becomes called Abandoned Cart.
At Magento, if anything update happens then the update_at of quote table will update at.
So, you need to get a quote collection where
updated_at field value 24hrs before.
and using cron clear that quote collection.