cancel
Showing results for 
Search instead for 
Did you mean: 

Deleted orders in database show in Grid

SOLVED

Deleted orders in database show in Grid

How do I delete orders in Magento 2.2.1?  I deleted the orders in database from the sales_order table, but they still show in admin > sales > orders.

 

I don't want to use an extension.  HELP!!!

Tags (1)
7 REPLIES

Re: Deleted orders in database show in Grid

Hi @shebafoods,

 

Did you tried running the indexer from shell?

I was able to fix a similar issue with Customers grid but I'm not sure if Sales grid can be reindexed.

How did you delet the orders?

 

 

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Deleted orders in database show in Grid

I deleted the orders from database > sales_order table.

Please share the command to "run indexer from shell".

Re: Deleted orders in database show in Grid

Admin grid loads from sales_order_grid table. When a order is placed it is added in sales_order table and after indexing it is sent to sales_order_grid to be shown in backend list.

Hope this will help you.

Re: Deleted orders in database show in Grid

php bin/magento indexer:reindex

This is the shell command to run indexer in magento 2.

If Issue Solved, Click Kudos/Accept As solutions.

Re: Deleted orders in database show in Grid

Order is still showing because those order entries are still exist in - sales_order_grid table.

 

Kindly delete all the data from sales_order_grid  table.

 

After that run php bin/magento indexer:reindex command

 

It will works !!

if issue solved,Click Kudos & Accept as Solution

Re: Deleted orders in database show in Grid

Whenever you deleted the record from sales_order table at that time, Your order deletes from Magento but when you have checked inside order grid, you show those order because sales_order_grid table is responsible for Order Grid record in Magento 2 so you need to remove the record from sales_order_grid table also.

 

Below is a free extension for order delete in Magento 2,

Order Delete in magento 2

 

After delete order, you need to run command for indexing,

php bin/magento indexer:reindex
If Issue Solved, Click Kudos/Accept As solutions.