Last active
September 15, 2016 16:55
-
-
Save josephdpurcell/c96286a7c4d2f5d1fe92fb36ee5d0d5a to your computer and use it in GitHub Desktop.
Add filter index to store id on order grid (Magento v1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5619599070b89d48482d7abbe421daebf7512da7 Mon Sep 17 00:00:00 2001 | |
From: "Joseph D. Purcell" <josephdpurcell@gmail.com> | |
Date: Thu, 15 Sep 2016 11:46:31 -0500 | |
Subject: [PATCH] Add filter index to store id on order grid | |
--- | |
www/app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php | 1 + | |
1 file changed, 1 insertion(+) | |
diff --git a/www/app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php b/www/app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php | |
index 6c5871e..2d0f67e 100644 | |
--- a/www/app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php | |
+++ b/www/app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php | |
@@ -79,6 +79,7 @@ class Mage_Adminhtml_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_ | |
'type' => 'store', | |
'store_view'=> true, | |
'display_deleted' => true, | |
+ 'filter_index' => 'main_table.store_id', | |
)); | |
} | |
-- | |
2.7.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'store_id' in where clause is ambiguous, query was: SELECT `main_table`.*, `order_table`.`admin_user_id` FROM `sales_flat_order_grid` AS `main_table` | |
LEFT JOIN `sales_flat_order` AS `order_table` ON order_table.entity_id=main_table.entity_id WHERE (`store_id` = '1') ORDER BY main_table.created_at DESC LIMIT 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment