E
E
eugene1592019-12-06 00:18:13
MODX
eugene159, 2019-12-06 00:18:13

How to make a category filter in mFilter2 (mSearch2), but at the same time not display product folders in which product variations are located?

The website has the following product structure:

- Столы
-- Стол M202
--- Стол М202 Светлый
--- Стол М202 Темный
-- ...
- Стулья
- ...

I want mFilter2 to display categories (filters with checkboxes):
"Tables", "Chairs".
And so that if the user checked the "Tables" checkbox, then he would be shown products from this category: "Table M202 Light", "Table M202 Dark"...
I wrote the following attributes:
&filters=`parent:categories`
&hideContainers=`1`
&parents=`(id "Столы" и id "Стулья")`
&depth=`10`

As a result of this code, "Table M202" becomes the same category as "Tables", "Chairs". And I don't need it.
I tried to remove "Published" from "Desk M202". But then the variations of this table are not displayed.
How can I display categories, but so that the product, within which its variations are located, is not considered a category?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Just_Andrew, 2019-12-06
@Just_Andrew

In the parameter, specify the search depth from the parent
&depth=`1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question