markshust / magento2-module-ordergrid

The Order Grid module adds more details to the order grid in the admin.
MIT License
85 stars 30 forks source link

Customer orders grid not loading #6

Closed JelleGe closed 3 years ago

JelleGe commented 3 years ago

Hi,

We face the problem, that the customer orders grid is not loading anymore. The admin general order grid is working fine with the products, but inside a customer, the orders grid does not load.

We get the following error:

[2021-03-24 13:31:51] main.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'customer_id' in where clause is ambiguous, query was: SELECT COUNT(DISTINCT main_table.entity_id) FROM sales_order_grid AS main_table INNER JOIN sales_order_item ON main_table.entity_id = sales_order_item.order_id LEFT JOIN sales_order_address AS customer_address ON main_table.entity_id = customer_address.parent_id and address_type="billing" WHERE (customer_id = '1') [] []

How can we solve this?

markshust commented 3 years ago

The PR https://github.com/markshust/magento2-module-ordergrid/pull/5 was just merged in, which should resolve this issue.

JelleGe commented 3 years ago

Hi Mark, just checked it, but the order grid inside the customer still does not load. Same issue when the new version is enabled. Can you please check this? We still fetch the same issue/error.