File tree Expand file tree Collapse file tree 3 files changed +0
-35
lines changed
Catalog/Model/Layer/Filter/DataProvider Expand file tree Collapse file tree 3 files changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -1168,7 +1168,6 @@ protected function _saveProductAttributes(array $attributesData)
1168
1168
{
1169
1169
foreach ($ attributesData as $ tableName => $ skuData ) {
1170
1170
$ tableData = [];
1171
- $ where = [];
1172
1171
foreach ($ skuData as $ sku => $ attributes ) {
1173
1172
$ productId = $ this ->skuProcessor ->getNewSku ($ sku )['entity_id ' ];
1174
1173
@@ -1181,30 +1180,8 @@ protected function _saveProductAttributes(array $attributesData)
1181
1180
'value ' => $ storeValue ,
1182
1181
];
1183
1182
}
1184
- /*
1185
- If the store based values are not provided for a particular store,
1186
- we default to the default scope values.
1187
- In this case, remove all the existing store based values stored in the table.
1188
- */
1189
- $ where [] = $ this ->_connection ->quoteInto (
1190
- '(store_id NOT IN (?) ' ,
1191
- array_keys ($ storeValues )
1192
- ) . $ this ->_connection ->quoteInto (
1193
- ' AND attribute_id = ? ' ,
1194
- $ attributeId
1195
- ) . $ this ->_connection ->quoteInto (
1196
- ' AND entity_id = ?) ' ,
1197
- $ productId
1198
- );
1199
- if (count ($ where ) >= self ::ATTRIBUTE_DELETE_BUNCH ) {
1200
- $ this ->_connection ->delete ($ tableName , implode (' OR ' , $ where ));
1201
- $ where = [];
1202
- }
1203
1183
}
1204
1184
}
1205
- if (!empty ($ where )) {
1206
- $ this ->_connection ->delete ($ tableName , implode (' OR ' , $ where ));
1207
- }
1208
1185
$ this ->_connection ->insertOnDuplicate ($ tableName , $ tableData , ['value ' ]);
1209
1186
}
1210
1187
return $ this ;
Original file line number Diff line number Diff line change @@ -520,18 +520,6 @@ public function testSaveProductAttributes()
520
520
$ this ->_connection ->expects ($ this ->any ())
521
521
->method ('quoteInto ' )
522
522
->willReturnCallback ([$ this , 'returnQuoteCallback ' ]);
523
- $ this ->_connection
524
- ->expects ($ this ->once ())
525
- ->method ('delete ' )
526
- ->with (
527
- $ this ->equalTo ($ testTable ),
528
- $ this ->equalTo (
529
- '(store_id NOT IN ( '
530
- . $ storeId . ') AND attribute_id = '
531
- . $ attributeId . ' AND entity_id = '
532
- . self ::ENTITY_ID . ') '
533
- )
534
- );
535
523
536
524
$ tableData [] = [
537
525
'entity_id ' => self ::ENTITY_ID ,
You can’t perform that action at this time.
0 commit comments