Currently when I look in database, the quote of order still exist after order successfully created. Will the order quote be removed later under some conditions? What happens to order if associated quote removed and vice versa?
1 Answer
When the order is placed, the quote is deactivated. The field is_active
is set to 0.
There is a cron that removes all the inactive quotes that are older than X days.
The cron is sales_clean_quotes
and it maps to Magento\Sales\Cron\CleanExpiredQuotes::execute()
.
What happens to order if associated quote removed and vice versa?
Nothing. The order is valid if you remove the quote. And the quote will be cleaned up by the cron later if you remove the order associated to it.