File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
CatalogImportExport/Model/Import
CatalogUrlRewrite/Model/Product/Plugin
dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/Product/Type Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1324,10 +1324,14 @@ protected function _saveProducts()
1324
1324
}
1325
1325
}
1326
1326
1327
+ $ this ->websitesCache [$ rowSku ] = [];
1327
1328
// 2. Product-to-Website phase
1328
1329
if (!empty ($ rowData [self ::COL_PRODUCT_WEBSITES ])) {
1329
- $ websiteId = $ this ->storeResolver ->getWebsiteCodeToId ($ rowData [self ::COL_PRODUCT_WEBSITES ]);
1330
- $ this ->websitesCache [$ rowSku ][$ websiteId ] = true ;
1330
+ $ websiteIds = explode ($ this ->getMultipleValueSeparator (), $ rowData [self ::COL_PRODUCT_WEBSITES ]);
1331
+ foreach ($ websiteIds as $ websiteId ) {
1332
+ $ websiteId = $ this ->storeResolver ->getWebsiteCodeToId ($ rowData [self ::COL_PRODUCT_WEBSITES ]);
1333
+ $ this ->websitesCache [$ rowSku ][$ websiteId ] = true ;
1334
+ }
1331
1335
}
1332
1336
1333
1337
// 3. Categories phase
Original file line number Diff line number Diff line change @@ -183,7 +183,9 @@ protected function _populateForUrlGeneration($rowData)
183
183
$ this ->websitesToStoreIds [$ websiteId ] = $ this ->storeManager ->getWebsite ($ websiteId )->getStoreIds ();
184
184
}
185
185
}
186
- if ($ storeId = $ this ->import ->getStoreIdByCode ($ rowData [ImportProduct::COL_STORE ])) {
186
+ if (!empty ($ rowData [ImportProduct::COL_STORE ])
187
+ && ($ storeId = $ this ->import ->getStoreIdByCode ($ rowData [ImportProduct::COL_STORE ]))
188
+ ) {
187
189
$ product ->setStoreId ($ storeId );
188
190
}
189
191
if ($ this ->isGlobalScope ($ product ->getStoreId ())) {
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ protected function setUp()
25
25
[
26
26
$ objectManager ->get ('Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory ' ),
27
27
$ objectManager ->get ('Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory ' ),
28
+ $ objectManager ->get ('Magento\Framework\App\Resource ' ),
28
29
$ params
29
30
]
30
31
);
You can’t perform that action at this time.
0 commit comments