Auto-distribution of properties across catalog sections
If a trade catalog is represented by a large number of sections and elements, then the catalog information block, as a rule, contains many properties. And on the element editing form, all properties are displayed, even those that are not relevant for this element.
It is possible to bind element properties to specific sections. But doing this manually for a large catalog takes a long time.
This module analyzes the filled properties in section products and automatically binds these properties to these sections.
In this case, you can specify in advance which properties should be displayed in the smart filter.
There are properties that are general (for example, Manufacturer) or service (video code from YouTube, Popular product, Rating, Forum topic for reviews...). These properties must be displayed in all product cards. So that they are not tied to the entire directory, but remain general, the module has a setting for each property “Do not process this property.” If this flag is set, the property will be ignored by the module.
The catalog may be presented in different forms on different sites. Somewhere, products are displayed only at the final level of the section hierarchy or simply not including the products of subsections. Somewhere products are displayed taking into account the products of subsections. Therefore, it is possible to either bind properties and display them in a smart filter only for sections directly containing the products. Or you can add these properties to parent sections. To do this, a flag has been added: "Bind properties selected for the smart filter to all parent sections of the element section."
If you uncheck the "Bind properties selected for the smart filter to all parent sections of the item section" checkbox, then the properties will be bound only to the sections that directly contain the products. And these properties will be shown in the smart filter only for these sections. For example, there is a section “Shoes”, in it there is a section “Men’s”, in it there is a section “Sneakers”. And there is a property "Country of Manufacture" which you checked "Use in smart filter". If the checkbox "Bind properties selected for the smart filter to all parent sections of the element section" is unchecked, then after processing on the site in the "Shoes-Men's-Sneakers" section in the smart filter there will be a "Country of Manufacture" property, and in the "Shoes" sections - Men's" and "Shoes" will not be available. If you leave the checkbox, then in “Shoes”, and in “Shoes-Men’s”, and in “Shoes-Men’s-Sneakers” there will be “Country of Manufacture” in the smart filter.
If you need both options, then this can be done manually. Decide what is more important - properties that should be displayed at all levels of the hierarchy, or, conversely, properties that should be only at the last level of the hierarchy. Select the appropriate value for the "Bind properties selected for the smart filter to all parent sections of the element section" checkbox, and after processing, check or uncheck the "Show in smart filter" checkbox in the settings of the required sections.
After processing by the module, it is necessary to configure the fields of the information block element editing form and clear the previously set properties, leaving only “Property values” (see
Over time, new properties and new sections may appear that do not have property bindings. In this case, you need to run the property distribution again. The module stores information about the last setting, so all that remains is to set the settings for new properties.
The module supports php versions from 5.6 to 8.2.