Filters and Conditions
To manage complex catalogs and provide a smooth navigation experience, Webround Commerce uses an advanced system of Filters and Conditions. These tools are not just for categorizing products; they are the logical engines that allow you to build targeted searches, dynamic collections, and faceted navigation.
While Tags and Attributes are the "data" stored on the product, Filters and Conditions are the "instructions" that decide which products to show to the user.
The Filter: The Logical Group
A Filter should be interpreted as a container or a group of rules. Its primary function is to group different conditions and decide how they should interact with each other through logical operators.
Set Logic
Each filter defines an operator that establishes the relationship between its internal conditions:
- AND: All conditions within the filter must be met simultaneously for a product to be displayed.
- OR: It is sufficient for at least one of the internal conditions to be met.
Filters are localizable (the filter name can be translated) because they often appear directly on the front-end as headings for search sections (e.g., "Filter by Price" or "Technical Parameters"). They can also be ordered via a specific position to manage the visual hierarchy on the site.
Conditions: The Base Unit
The Condition is the atom of the search system. Without conditions, a filter is an empty container. A condition performs a specific check on a catalog field and determines if a product "passes the test."
Webround allows you to set conditions on five fundamental areas, each with its own specific operators:
1. Tag Value
Allows checking for the presence of specific labels.
- Operators:
=(equals),!=(does not equal). - Usage: Find all products that have (or do not have) the "Green" tag.
2. Product Name and Variant Name
Performs textual checks on identification strings.
- Operators:
=,!=,contains,startsWith,endsWith. - Usage: Find all products whose name contains the word "Limited."
3. Price
Allows filtering products based on economic value. Since Webround is a multi-currency and multi-frequency system, the price condition always requires specifying the currency (e.g., EUR) and the frequency (e.g., One-time, Monthly).
- Operators:
=,!=,<,<=,>,>=,range. - Usage: Find products with a one-time price lower than €50 or within a range between €10 and €30.
4. Attributes
Leverages the power of custom fields defined on products.
- Operators: All text and price operators, including
range. - Usage: Since attribute values are dynamic, this condition is perfect for managing numerical intervals (e.g., "Mileage between 10,000 and 50,000") or textual matches on technical codes.
Summary of the Logical Relationship
The system works like a "nesting doll":
- The Condition queries the data (e.g., "Price < 100").
- The Filter collects the conditions and joins them (e.g., "Price < 100" AND "Size = XL").
- The Catalog APIs read the filter and return the products that satisfy the entire logic.
This structure allows for the creation of extremely specific landing pages (e.g., a page showing only "Nike Shoes (Tag) in Red (Tag) costing less than €100 (Price)") simply by composing the correct filters and conditions in the management panel.
Range Filters
Special attention should be given to Range Filters, indispensable tools for managing numerical or temporal data dynamically. These filters are based on conditions that, instead of looking for an exact value, define a perimeter of inclusion.
When you set a range type condition on a Price or a numerical Attribute, you can specify a Min and a Max value. These values have a dual purpose:
- Placeholder and Default: They inform the front-end of the limits within which the user can move (for example, to populate the ends of a slider).
- Input Logic: They allow the user interface (sliders, "from/to" input fields) to send a specific value chosen by the customer to the APIs, instantly filtering the catalog.
Whether it's searching for products in a certain price range or used cars with a specific mileage, range filters transform granular data into a fluid and intuitive search experience, allowing the user to "narrow the circle" on results of interest.