Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top