Skip to content

Commit

Permalink
BUGFIX: get categories from active channel
Browse files Browse the repository at this point in the history
- avoid category connector errors
  • Loading branch information
dxops committed Aug 17, 2020
1 parent f982ed0 commit bd403e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ImportExport/Strategy/CategoryImportStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ protected function beforeProcessEntity($entity)
{
$this->setOwner($entity);

return parent::beforeProcessEntity($entity);
}

protected function afterProcessEntity($entity)
{
if ($entity instanceof Category) {
$parent = $entity->getParentCategory();
if ($parent instanceof Category && !$parent->getId()) {
Expand All @@ -58,6 +53,11 @@ protected function afterProcessEntity($entity)
}
}

return parent::beforeProcessEntity($entity);
}

protected function afterProcessEntity($entity)
{
$this->existingCategories = [];

return parent::afterProcessEntity($entity);
Expand Down
1 change: 0 additions & 1 deletion Integration/AkeneoTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public function getCategories(int $pageSize)

if (!empty($akeneoChannel)) {
foreach ($this->client->getChannelApi()->all() as $channel) {

$categoryTreeChannel = ($channel['code'] == $akeneoChannel && !empty($channel['category_tree'])) ? $channel['category_tree'] : null;

if (null !== $categoryTreeChannel) {
Expand Down

0 comments on commit bd403e0

Please sign in to comment.