ka4az
ka4az

Reputation: 1

Erroneous showing of products - WooCommerrce

I have a problem with WooCommerce. I have a store that has a lot of categories and subcategories. Some of them repeat the same names. For example:

Store -> Girl -> Blouses
Store -> Girl -> Pants

Store -> Baby -> Girl -> Blouses
Store -> Baby -> Girl -> Pants

And now when I add a product to the category "Child -> Girl -> Blouses" it also displays it when I click the category "Girl" - the main one.

How to fix this?

Translated with www.DeepL.com/Translator (free version)

Upvotes: 0

Views: 32

Answers (1)

Vijay Hardaha
Vijay Hardaha

Reputation: 2584

I am guessing you're confused by the same category's name in the child-parent relationship. So even though the names are the same but those categories have unique IDs and slugs.

Store -> Girl -> Blouses

In the above case, the Girl category is your parent category and Blouses is a child of the Girl, they have a relationship in between. So if you have Blouses as the main category somewhere so it's not equal to Girl -> Blouses

Store -> Baby -> Girl -> Blouses

In this next example, Baby is your main category and Girl is a child of the Baby category and Blouses is a child of Girl but Girl -> Blouses and Baby -> Girl -> Blouses are not equal.

they all will have a different slug. for example in Store -> Girl -> Blouses Girl might have slug girl but Store -> Baby -> Girl -> Blouses Girl should have slug-like girl-baby

you can see these slugs in urls. So when you'll click on the girl from Store -> Girl -> Blouses you'll land on a different page and when you'll Click on Girl from Store -> Baby -> Girl -> Blouses you'll land on a different page.

so Even though names are the same but categories are not the same if they are in a child-parent relationship.

Upvotes: 1

Related Questions