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

stocks categories filter #12899

Open
Flower7C3 opened this Issue Mar 12, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@Flower7C3
Copy link

Flower7C3 commented Mar 12, 2019

Describe the bug
Categories filter is stocks screen searches by name not id. In addition categories are ordered by id_parent not position.

To Reproduce
Steps to reproduce the behavior:

  1. Go to BO / Catalogue / Stocks
  2. Click on Advanced filters, select Filter by categories.
  3. Select category which name occurs in other subcategory.
  4. Both categories will be searched.

Screenshots
Zrzut ekranu 2019-03-12 o 22 24 40

Additionnal information
PrestaShop version: 1.7.5
PHP version: 7.2

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

khouloudbelguith commented Mar 13, 2019

Hi @Flower7C3,

About your first note, yes, you are right the categories are not ordered by position.
About your issue:

Both categories will be searched.

I did not manage to reproduce the issue
I created three categories with contains the same name => But it is OK.
The search is done only by the category selected.
I attached a video record.
https://drive.google.com/file/d/1GELwNOr6GwHLtAwoTbFbVphMO9xoeo9V/view
Thanks to check & feedback.

@Flower7C3

This comment has been minimized.

Copy link
Author

Flower7C3 commented Mar 13, 2019

@khouloudbelguith in Your example categories have different name. In my customer's store there are structure like this:

  • Root (1)
    • Books (2)
      • Kids (3)
      • Adults (4)
    • Movies (5)
      • Kids (6)
      • Adults (7)

So when I want to filter by category Kids (id 4, in Root/Books) it also filters by Kids (id 6, from Root/Movies).

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

khouloudbelguith commented Mar 14, 2019

@Flower7C3, thanks for these clarifications.
I manage to reproduce the issue with PS1.7.5.1 & PS1.7.4.4.
image
I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!

@khouloudbelguith khouloudbelguith added Minor To Do 1.7.4.4 and removed NMI labels Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.