Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function saveData()
foreach ($associatedSkusAndQtyPairs as $associatedSkuAndQty) {
++$position;
$associatedSkuAndQty = explode(self::SKU_QTY_DELIMITER, $associatedSkuAndQty);
$associatedSku = isset($associatedSkuAndQty[0]) ? trim($associatedSkuAndQty[0]) : null;
$associatedSku = isset($associatedSkuAndQty[0]) ? strtolower(trim($associatedSkuAndQty[0])) : null;
if (isset($newSku[$associatedSku])) {
$linkedProductId = $newSku[$associatedSku][$this->getProductEntityIdentifierField()];
} elseif (isset($oldSku[$associatedSku])) {
Expand All @@ -99,7 +99,7 @@ public function saveData()
}
$scope = $this->_entityModel->getRowScope($rowData);
if (Product::SCOPE_DEFAULT == $scope) {
$productData = $newSku[$rowData[Product::COL_SKU]];
$productData = $newSku[strtolower($rowData[Product::COL_SKU])];
} else {
$colAttrSet = Product::COL_ATTR_SET;
$rowData[$colAttrSet] = $productData['attr_set_code'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function saveDataProvider()
'skus' => [
'newSku' => [
'sku_assoc1' => ['entity_id' => 1],
'productSku' => ['entity_id' => 3, 'attr_set_code' => 'Default', 'type_id' => 'grouped']
'productsku' => ['entity_id' => 3, 'attr_set_code' => 'Default', 'type_id' => 'grouped']
],
'oldSku' => ['sku_assoc2' => ['entity_id' => 2]]
],
Expand All @@ -205,7 +205,7 @@ public function saveDataProvider()
[
'skus' => [
'newSku' => [
'productSku' => ['entity_id' => 1, 'attr_set_code' => 'Default', 'type_id' => 'grouped']
'productsku' => ['entity_id' => 1, 'attr_set_code' => 'Default', 'type_id' => 'grouped']
],
'oldSku' => []
],
Expand Down Expand Up @@ -247,7 +247,7 @@ public function testSaveDataScopeStore()
{
$this->entityModel->expects($this->once())->method('getNewSku')->will($this->returnValue([
'sku_assoc1' => ['entity_id' => 1],
'productSku' => ['entity_id' => 2, 'attr_set_code' => 'Default', 'type_id' => 'grouped']
'productsku' => ['entity_id' => 2, 'attr_set_code' => 'Default', 'type_id' => 'grouped']
]));
$this->entityModel->expects($this->once())->method('getOldSku')->will($this->returnValue([
'sku_assoc2' => ['entity_id' => 3]
Expand Down