taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 29 forks source link

ISSUE 341: Fix order grid filter error #342

Closed sethobey closed 1 year ago

sethobey commented 1 year ago

Context

Closes #341

Previous PRs addressed issues with SORTING of TaxJar sync date values in various sales order grids, but have not addressed FILTERING of values.

For legacy reasons due to porting the original M1 integration to M2, TaxJar sync date data has historically been stored directly on Magento core entity tables. Our extension would then use an after-plugin method to perform a left join between the grid table (like sales_order_grid) to the corresponding primary table (like sales_order) so that our sync date value (sales_order.tj_salestax_sync_date) can be included in grid-collection data.

Because Magento's grid collection query includes a generic created_at column (no table specified like main_table.created_at), and our left join operation introduces a second table with a created_at column, it creates an ambiguous query which errors out if merchant attempts to filter a sales grid by ANY value.

Description

Performance

Break-fix

Testing

WIP

https://user-images.githubusercontent.com/47947793/192032355-e183f8f2-9bb5-46e5-a407-22d51aab01cd.mov

Versions

sethobey commented 1 year ago

Simpler solution identified with plugin