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 15
15
use Magento \Framework \DataObject \Copy \Config ;
16
16
use Magento \Framework \DB \Adapter \AdapterInterface ;
17
17
use Magento \Framework \Event \ManagerInterface ;
18
+ use Magento \Framework \Exception \LocalizedException ;
18
19
use Magento \Framework \Model \ResourceModel \Db \VersionControl \Snapshot ;
19
20
use Magento \Framework \Validator \UniversalFactory ;
20
21
use Magento \Store \Model \StoreManagerInterface ;
@@ -154,4 +155,35 @@ protected function beforeAddLoadedItem(DataObject $item): DataObject
154
155
155
156
return parent ::beforeAddLoadedItem ($ item );
156
157
}
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
+ }
157
189
}
You can’t perform that action at this time.
0 commit comments