1

I am facing a very serious issue with Magento 1.9 website. This has happened a couple of times. Customer places the order, they even get an email confirming the order but the order does not show in the Magento admin panel.

Could you please help shade some light as to what could have caused this?

Thanks

3
  • did you check if the order is in the database?
    – HelgeB
    Mar 4, 2019 at 14:53
  • @HelgeB I can see the order in the sales_flat_quote table in the database but that's it, what do i do? Or what could have happened?
    – K Kazadi
    Mar 6, 2019 at 12:18
  • The order must be in sales_flat_order table and if everything works correctly in sales_flat_order_grid too. If you have the order only in sales_flat_order and not in sales_flat_order_grid the approach proposed by @Sohel Rana should work for new orders (although you should identify the problem!). For ald orders you can copy orders from sales_flat_order to sales_flat_order_grid using SQL. If you don't have the orders in sales_flat_order it looks like a greater problem in your store.
    – HelgeB
    Mar 6, 2019 at 12:57

1 Answer 1

0

First of all check, any custom extension blocks your order to save grid. Also, you can add the following event:

<sales_order_save_after>
    <observers>
        <sr_sales_order_save_after>
            <class>sr_magentocommunity/observer</class>
            <method>salesOrderSaveAfter</method>
        </sr_sales_order_save_after>
    </observers>
</sales_order_save_after>

add the following code in your observer

/**
 * @param Varien_Event_Observer $observer
 */
public function salesOrderSaveAfter(Varien_Event_Observer $observer)
{
    $order = $observer->getEvent()->getOrder();
    if($order && ($orderId = $order->getId())) {
        Mage::getModel('sales/order')->getResource()->updateGridRecords([$orderId]);
    }
}

Your Answer

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

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