File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
app/code/Magento/Sales/Model/ResourceModel/Order/Customer Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1515use Magento \Framework \DataObject \Copy \Config ;
1616use Magento \Framework \DB \Adapter \AdapterInterface ;
1717use Magento \Framework \Event \ManagerInterface ;
18+ use Magento \Framework \Exception \LocalizedException ;
1819use Magento \Framework \Model \ResourceModel \Db \VersionControl \Snapshot ;
1920use Magento \Framework \Validator \UniversalFactory ;
2021use Magento \Store \Model \StoreManagerInterface ;
@@ -154,4 +155,35 @@ protected function beforeAddLoadedItem(DataObject $item): DataObject
154155
155156 return parent ::beforeAddLoadedItem ($ item );
156157 }
158+
159+ /**
160+ * @inheritDoc
161+ * @throws LocalizedException
162+ */
163+ public function addFieldToFilter ($ field , $ condition = null )
164+ {
165+ if ($ field === 'store_name ' ) {
166+ $ this ->joinField (
167+ 'store_name ' ,
168+ 'store ' ,
169+ 'name ' ,
170+ 'store_id=store_id ' ,
171+ null ,
172+ 'left '
173+ );
174+ }
175+
176+ if ($ field === 'website_name ' ) {
177+ $ this ->joinField (
178+ 'website_name ' ,
179+ 'store_website ' ,
180+ 'name ' ,
181+ 'website_id=website_id ' ,
182+ null ,
183+ 'left '
184+ );
185+ }
186+
187+ return parent ::addFieldToFilter ($ field , $ condition );
188+ }
157189}
You can’t perform that action at this time.
0 commit comments