File tree Expand file tree Collapse file tree 2 files changed +0
-35
lines changed
app/code/Magento/CatalogImportExport Expand file tree Collapse file tree 2 files changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -1120,7 +1120,6 @@ protected function _saveProductAttributes(array $attributesData)
1120
1120
{
1121
1121
foreach ($ attributesData as $ tableName => $ skuData ) {
1122
1122
$ tableData = [];
1123
- $ where = [];
1124
1123
foreach ($ skuData as $ sku => $ attributes ) {
1125
1124
$ productId = $ this ->skuProcessor ->getNewSku ($ sku )['entity_id ' ];
1126
1125
@@ -1133,30 +1132,8 @@ protected function _saveProductAttributes(array $attributesData)
1133
1132
'value ' => $ storeValue ,
1134
1133
];
1135
1134
}
1136
- /*
1137
- If the store based values are not provided for a particular store,
1138
- we default to the default scope values.
1139
- In this case, remove all the existing store based values stored in the table.
1140
- */
1141
- $ where [] = $ this ->_connection ->quoteInto (
1142
- '(store_id NOT IN (?) ' ,
1143
- array_keys ($ storeValues )
1144
- ) . $ this ->_connection ->quoteInto (
1145
- ' AND attribute_id = ? ' ,
1146
- $ attributeId
1147
- ) . $ this ->_connection ->quoteInto (
1148
- ' AND entity_id = ?) ' ,
1149
- $ productId
1150
- );
1151
- if (count ($ where ) >= self ::ATTRIBUTE_DELETE_BUNCH ) {
1152
- $ this ->_connection ->delete ($ tableName , implode (' OR ' , $ where ));
1153
- $ where = [];
1154
- }
1155
1135
}
1156
1136
}
1157
- if (!empty ($ where )) {
1158
- $ this ->_connection ->delete ($ tableName , implode (' OR ' , $ where ));
1159
- }
1160
1137
$ this ->_connection ->insertOnDuplicate ($ tableName , $ tableData , ['value ' ]);
1161
1138
}
1162
1139
return $ this ;
Original file line number Diff line number Diff line change @@ -504,18 +504,6 @@ public function testSaveProductAttributes()
504
504
$ this ->_connection ->expects ($ this ->any ())
505
505
->method ('quoteInto ' )
506
506
->willReturnCallback ([$ this , 'returnQuoteCallback ' ]);
507
- $ this ->_connection
508
- ->expects ($ this ->once ())
509
- ->method ('delete ' )
510
- ->with (
511
- $ this ->equalTo ($ testTable ),
512
- $ this ->equalTo (
513
- '(store_id NOT IN ( '
514
- . $ storeId . ') AND attribute_id = '
515
- . $ attributeId . ' AND entity_id = '
516
- . self ::ENTITY_ID . ') '
517
- )
518
- );
519
507
520
508
$ tableData [] = [
521
509
'entity_id ' => self ::ENTITY_ID ,
You can’t perform that action at this time.
0 commit comments