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)
11681168 {
11691169 foreach ($ attributesData as $ tableName => $ skuData ) {
11701170 $ tableData = [];
1171- $ where = [];
11721171 foreach ($ skuData as $ sku => $ attributes ) {
11731172 $ productId = $ this ->skuProcessor ->getNewSku ($ sku )['entity_id ' ];
11741173
@@ -1181,30 +1180,8 @@ protected function _saveProductAttributes(array $attributesData)
11811180 'value ' => $ storeValue ,
11821181 ];
11831182 }
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- }
12031183 }
12041184 }
1205- if (!empty ($ where )) {
1206- $ this ->_connection ->delete ($ tableName , implode (' OR ' , $ where ));
1207- }
12081185 $ this ->_connection ->insertOnDuplicate ($ tableName , $ tableData , ['value ' ]);
12091186 }
12101187 return $ this ;
Original file line number Diff line number Diff line change @@ -520,18 +520,6 @@ public function testSaveProductAttributes()
520520 $ this ->_connection ->expects ($ this ->any ())
521521 ->method ('quoteInto ' )
522522 ->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- );
535523
536524 $ tableData [] = [
537525 'entity_id ' => self ::ENTITY_ID ,
You can’t perform that action at this time.
0 commit comments