Skip to content

FindChildCategories not finding sub categories of the current one #5

@icedocemile

Description

@icedocemile

Hi,

In function CategoryRepository#findChildCategoriesNamesAndIds, to find nested categories the SQL query include that condition :
AND c.id_parent > '.(int)$category->id.'

Which is wrong, because a subcategory dosn't significate the category ID is greater.
I strongly suggest you use the native function :
Category::getNestedCategories

This will returns the right ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions