Hi I have a custom grid which displays sales order items and I need to add a column to grid csv export.The column is an product eav attribute of ordered product.How can I load the product's eav attribute for each order item row for the exported csv. I have found the following query but I need to load the product's eav attribute.

                'pickup_location_code' => new \Zend_Db_Expr('(SELECT `pickup_location_code` FROM `sales_order_grid` WHERE `sales_order_grid`.`entity_id` = main_table.`entity_id` GROUP BY `sales_order_grid`.`entity_id`)')

The above code is used in a plugin beforeLoad the grid. Please help.


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.