Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix category position #296

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mbijnsdorp
Copy link

Fix for issue #281.

During initCategories, the position of the next child for every category is retrieved from the db and updated during the import. If the position is not in the import data, the next_child_position is used and updated.

When an existing category is moved from one parent to another, it also gets a new position

We have a slightly different implementation of the category entity adapter, so someone should still test this.

mbijnsdorp and others added 2 commits March 1, 2016 11:45
During initCategories, the position of the next child for every category is retrieved from the db and updated during the
import. If the position is not in the import data, the next_child_position is used and updated.

When an existing category is moved from one parent to another, it also gets a new position
$entityId = $this->_categoriesWithRoots[$rowData[self::COL_ROOT]][$rowData[self::COL_CATEGORY]]['entity_id'];
$path = $parentCategory['path'] .'/'.$entityId;
$position = $this->_categoriesWithRoots[$rowData[self::COL_ROOT]][self::COL_CATEGORY]['position'];
Copy link
Contributor

@barbazul barbazul Jun 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the second level key in the array was meant to be $rowData[self::COL_CATEGORY]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants