Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit b49d2ff

Browse files
author
carstenpfeifer
committed
#88: Set store id for product category initialization to 0. Would otherwise be null and set to 1 in \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection::getStoreId, leading to unwanted store values for category names.
1 parent 2910d8b commit b49d2ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ protected function initCategories()
7575
$collection->addAttributeToSelect('name')
7676
->addAttributeToSelect('url_key')
7777
->addAttributeToSelect('url_path');
78+
$collection->setStoreId(\Magento\Store\Model\Store::DEFAULT_STORE_ID);
7879
/* @var $collection \Magento\Catalog\Model\ResourceModel\Category\Collection */
7980
foreach ($collection as $category) {
8081
$structure = explode(self::DELIMITER_CATEGORY, $category->getPath());

0 commit comments

Comments
 (0)