Skip to content

Commit 2c76969

Browse files
author
Novykov Ivan
committed
MDVA-245: Problems when importing product data with store_view_code
1 parent d5a54e3 commit 2c76969

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

app/code/Magento/Catalog/Model/Layer/Filter/DataProvider/Category.php

100755100644
File mode changed.

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,30 +1181,8 @@ protected function _saveProductAttributes(array $attributesData)
11811181
'value' => $storeValue,
11821182
];
11831183
}
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-
}
12031184
}
12041185
}
1205-
if (!empty($where)) {
1206-
$this->_connection->delete($tableName, implode(' OR ', $where));
1207-
}
12081186
$this->_connection->insertOnDuplicate($tableName, $tableData, ['value']);
12091187
}
12101188
return $this;

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)