I experience a strange issue: The order was placed successfully but I can't find any according quote.

mysql> select increment_id, entity_id, quote_id, created_at  from sales_flat_order where increment_id=100000432;
| increment_id | entity_id | quote_id | created_at          |
| 100000432    |      1029 |    10383 | 2015-10-28 23:12:13 |
1 row in set (0.00 sec)

mysql> select * from sales_flat_quote where entity_id=10383;
Empty set (0.00 sec)

mysql> select * from sales_flat_quote_item where quote_id=10383;
Empty set (0.00 sec)

Isn't there always a quote?

Any chance to create a quote on base of the order?

The issue I'm facing right now is that I can't pull any order information in backend because an extension is throwing an exception because of the missing quoteItemId.

Any help is much appreciated. Thanks.

2 Answers 2


Take a look at Admin -> Checkout -> Shopping Cart -> Quote Lifetime (days)

By default magento will delete quote that has been converted to order after 30 days (the created_at date is over a month ago),

See https://stackoverflow.com/questions/12545128/are-unconverted-quote-records-ever-removed-in-magento

  • Thanks for your help! But does Magento also delete quotes which got converted into orders? I'm wondering because I find quotes in sales_flat_quote table back to 2010. Further its strange that the extension (Aitoc) relies on a quoteItemId in backend if these data are not persistent.
    – Stefan
    Nov 30, 2015 at 20:44
  • ONLY quote that got converted are deleted. Nov 30, 2015 at 20:50
  • Magento also have similar issues where you can not access a custom file upload option after the quote is deleted Nov 30, 2015 at 20:53
  • Please provide more information on the error that you are getting Nov 30, 2015 at 20:55

Speaking from an enterprise point of view, there is a quote cleaner cron job that runs and cleans (deletes) quotes every X days. I think the default is 30 (which could explain why the original quote above is gone).

On the backend, go to System -> Configuration -> Sales -> Checkout and checkout the section Shopping Cart.

It calls the method cleanExpiredQuotes in app/code/core/Mage/Sales/Model/Observer.php

Your Answer

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

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