Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.
Merged
Changes from 1 commit
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
Next Next commit
#88: Set store id for product category initialization to 0. Would oth…
…erwise 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
commit b49d2ff51cfad58d6b78cacaedf418aeadbd88ab
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