Skip to content

Commit

Permalink
magento-engcom/import-export-improvements#88: Set store id for produc…
Browse files Browse the repository at this point in the history
…t 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.
  • Loading branch information
carstenpfeifer committed Jun 16, 2018
1 parent 2910d8b commit b49d2ff
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ protected function initCategories()
$collection->addAttributeToSelect('name')
->addAttributeToSelect('url_key')
->addAttributeToSelect('url_path');
$collection->setStoreId(\Magento\Store\Model\Store::DEFAULT_STORE_ID);
/* @var $collection \Magento\Catalog\Model\ResourceModel\Category\Collection */
foreach ($collection as $category) {
$structure = explode(self::DELIMITER_CATEGORY, $category->getPath());
Expand Down

0 comments on commit b49d2ff

Please sign in to comment.