24

I am using the fedex shipping method and after generating the shipment,status shows completed in the order view page.But there is still showing 'processing' status in the sales order grid. Please check following screenshot. Can you guys help me!!!!

enter image description here

enter image description here

enter image description here

enter image description here

This order was placed using authorize.net payment method.I have set the processing status when someone place order using authorize payment method. So, How can i set the complete status in the admin grid.Please help!!!!!

12
  • Hello #sunny Please check your grid override from other 3rd party module or not, otherwise magento default has no issue in a grid...please check it once !!!
    – Dhrumin
    Commented Oct 4, 2018 at 6:42
  • Please check this screenshot.nimb.ws/SZmqfb. There should be change the status in the database too while generate the shipment. Commented Oct 4, 2018 at 6:45
  • Yes, Here it is processing then please check order view page i think issue on view page, order grid working as per your screenshot. is that right or not?
    – Dhrumin
    Commented Oct 4, 2018 at 6:50
  • I have generated the shipment with adding the fedex tracking code.So as per magento standard , if i generate the shipment then order status must change to complete.Please check the same issue in the git magento community. github.com/magento/magento2/issues/14406 Commented Oct 4, 2018 at 6:52
  • Yes, it seems it is a bug,.If an order all items invoice are generate and shipment than that order goes to complete state
    – Amit Bera
    Commented Oct 4, 2018 at 7:14

4 Answers 4

5

These solutions aren't very practical when you just want to update records for a single order. I tracked down the refresh method on the ResourceModel/Order/GridInterface which seems to do exactly this.

It can be called by injecting the class:

\Magento\Sales\Model\ResourceModel\GridPool

and calling the method

$gridPool->refreshByOrderId($orderId);

This updates all the _grid tables (invoice/shipment etc also).

You could adapt this to you specific needs by adding a Plugin to call this method after a shipment is created.

3

run this in your sql as a temporary solution

UPDATE sales_order_grid as t1 LEFT JOIN sales_order as t2 ON t1.entity_id = t2.entity_id SET t1.status = t2.status WHERE t1.status != t2.status 

This will update orders status in orders grid view

1
  • Was looking for this. Though to update but then had second thoughts, thanks for sharing. Will definitely run your query now on my live site lol let's see how it goes. Update: ok cool, one record was updated which is the one that was missed. Thanks for your query. Commented Nov 29, 2020 at 13:42
2

Please run below command

php bin/magento cron:run

php bin/magento indexer:reindex
1
0

I would have suggested php bin/magento indexer:reindex

There is a sales order and sales order grid table. Customers does the same too. A reindex will make sure they are both in sync.

1
  • 5
    The sales_order_grid table is not generated via index. Last time I checked you could've set it to update async from admin (at least on commerce), crons would take care of it then, and you would see some latency. But last time I checked there was no sales_order_grid index. Commented Jun 17, 2019 at 20:30

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.