File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/code/Magento/GroupedImportExport
Model/Import/Product/Type
Test/Unit/Model/Import/Product/Type Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public function saveData()
89
89
foreach ($ associatedSkusAndQtyPairs as $ associatedSkuAndQty ) {
90
90
++$ position ;
91
91
$ associatedSkuAndQty = explode (self ::SKU_QTY_DELIMITER , $ associatedSkuAndQty );
92
- $ associatedSku = isset ($ associatedSkuAndQty [0 ]) ? trim ($ associatedSkuAndQty [0 ]) : null ;
92
+ $ associatedSku = isset ($ associatedSkuAndQty [0 ]) ? strtolower ( trim ($ associatedSkuAndQty [0 ]) ) : null ;
93
93
if (isset ($ newSku [$ associatedSku ])) {
94
94
$ linkedProductId = $ newSku [$ associatedSku ][$ this ->getProductEntityIdentifierField ()];
95
95
} elseif (isset ($ oldSku [$ associatedSku ])) {
@@ -99,7 +99,7 @@ public function saveData()
99
99
}
100
100
$ scope = $ this ->_entityModel ->getRowScope ($ rowData );
101
101
if (Product::SCOPE_DEFAULT == $ scope ) {
102
- $ productData = $ newSku [$ rowData [Product::COL_SKU ]];
102
+ $ productData = $ newSku [strtolower ( $ rowData [Product::COL_SKU ]) ];
103
103
} else {
104
104
$ colAttrSet = Product::COL_ATTR_SET ;
105
105
$ rowData [$ colAttrSet ] = $ productData ['attr_set_code ' ];
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ public function saveDataProvider()
192
192
'skus ' => [
193
193
'newSku ' => [
194
194
'sku_assoc1 ' => ['entity_id ' => 1 ],
195
- 'productSku ' => ['entity_id ' => 3 , 'attr_set_code ' => 'Default ' , 'type_id ' => 'grouped ' ]
195
+ 'productsku ' => ['entity_id ' => 3 , 'attr_set_code ' => 'Default ' , 'type_id ' => 'grouped ' ]
196
196
],
197
197
'oldSku ' => ['sku_assoc2 ' => ['entity_id ' => 2 ]]
198
198
],
@@ -205,7 +205,7 @@ public function saveDataProvider()
205
205
[
206
206
'skus ' => [
207
207
'newSku ' => [
208
- 'productSku ' => ['entity_id ' => 1 , 'attr_set_code ' => 'Default ' , 'type_id ' => 'grouped ' ]
208
+ 'productsku ' => ['entity_id ' => 1 , 'attr_set_code ' => 'Default ' , 'type_id ' => 'grouped ' ]
209
209
],
210
210
'oldSku ' => []
211
211
],
@@ -247,7 +247,7 @@ public function testSaveDataScopeStore()
247
247
{
248
248
$ this ->entityModel ->expects ($ this ->once ())->method ('getNewSku ' )->will ($ this ->returnValue ([
249
249
'sku_assoc1 ' => ['entity_id ' => 1 ],
250
- 'productSku ' => ['entity_id ' => 2 , 'attr_set_code ' => 'Default ' , 'type_id ' => 'grouped ' ]
250
+ 'productsku ' => ['entity_id ' => 2 , 'attr_set_code ' => 'Default ' , 'type_id ' => 'grouped ' ]
251
251
]));
252
252
$ this ->entityModel ->expects ($ this ->once ())->method ('getOldSku ' )->will ($ this ->returnValue ([
253
253
'sku_assoc2 ' => ['entity_id ' => 3 ]
You can’t perform that action at this time.
0 commit comments