Skip to main content

Creating a similar products block

"Similar products block" is the second block type in the OneEntry platform. It is for products that share common characteristics, for example, all products within a certain price range.

The block has two modes:

  • Manual: you set the filtering rules yourself (attribute, condition, value). Setting conditions is covered in Basic data in Manual mode.
  • Automatic: the system picks similar products by matching the values of the selected attributes against the current product. Suited to "more like this" recommendations.

1. Creating a block​

To create a block of the "Similar products block" type, enter the block name in the Name field, select "Similar products block" in the "Type" dropdown, and enter a unique a unique identifier used to retrieve the entity in the Marker field. After you click Add, the block appears in the blocks table under the "Similar products block" category.

2. Editing a block​

To edit a block, click "Edit" in the "Actions" column of the blocks table.

Edit

Blocks of the "Similar products block" type have four tabs when you edit them:

  • Basic data
  • Attributes
  • Linked pages
  • Version History

Basic data in Manual mode​

The "Basic data" tab has the following forms:

  1. Name - the block name

  2. Marker - the block a unique identifier used to retrieve the entity

  3. Individual settings:

    • Quantity - the number of items in the block (integers only)
    • Sort type of block items - by date or by name
    • Sort order of block items - three options: ascending, descending, or no sorting
    • Items per row - the number of items in one row of the block (integers only)
  4. Add condition - adds conditions for product search. It has the following fields: - Attribute - a dropdown for choosing the attribute to search by, from all created product attribute sets. - Condition - a dropdown for choosing the search condition. Available filters:

    • contains
    • does not contain
    • equal to
    • not equal to
    • more
    • less
    • contains any value
    • does not contain a value
    • value based on the pattern - используйте маску вида: **-**, где * означает любой символ
    • the same value as the selected attribute
    • same value of the attribute part (truncated value)
    - Value - an input field for the value to search by. For example, to filter all items whose product_price is greater than 1000, set this condition:

    Add condition

    • Categories - selects the or screens of the "Catalog" type to search with the specified condition. It has a field for quickly finding or screens and a list of all or screens. If nothing is selected, the search covers all or screens of the "Catalog" type.
    • Non-indexed products - a checkbox: whether to include products that are not indexed yet.
    • Buttons - actions available in the "Add condition" module:
      • Add - adds the condition
      • Reset - resets the parameters of the current condition
      • Reset all - resets the parameters of the current condition and deletes the conditions created earlier for the current block
      • Copy filter - copies the filter to the clipboard
    Note

    To apply a condition, click Add
    Add condition

    • Added conditions - a table of the conditions added earlier. It has 7 columns:
      • Attribute
      • Condition
      • Value
      • Category
      • Products found
      • Content language code
      • Buttons for deleting a condition
    • Found products - a table of items that match the condition. To see why a product made the selection, open the Explanation tab of the Block preview (opens in a new tab) window: attribute matches are marked with a Matching attributes badge that lists the matched attributes.
Scrolling the category tree

A large category tree (Category tree) scrolls separately from the page: hover over the list and use the mouse wheel. Once you reach the very top or bottom, scrolling passes smoothly to the page. The tree adjusts automatically when you expand nested nodes.

Basic data in Automatic mode​

In automatic mode, the system finds similar products by matching the values of the selected attributes against the current product. In manual mode, you write the rules yourself (brand = X, price < Y); here, the system takes attribute values directly from the current product and picks products of the same kind.

The mode's settings are in the Match by attributes section. The section header has an ⓘ icon with a short hint. Click it to open a full explanation of the mode.

Attributes for comparison and Minimum matches​

After you set Selection mode to Automatic (by attributes), two fields appear in the form:

  • Attributes for comparison: the attributes the system matches on to find similar products. The list comes from the product set of attributes (opens in a new tab) selected in the Set of attributes field of the same Match by attributes section.
  • Minimum matches: the minimum number of matching attributes (an integer from 1 to the number of attributes selected in "Attributes for comparison"). It sets the matching logic:
    • Minimum matches = number of selected attributes → a product is included only if all attributes match (AND logic). For example, brand = X AND color = Y.
    • Minimum matches = 1 → a match on at least one attribute is enough (OR logic). Brand = X OR color = Y.
Choosing a value

For clothing and shoes, a low value (1) usually works; otherwise, few products make it into the selection. For strict filters (spare parts, compatibility), set Minimum matches to the number of selected attributes.

Requires an attribute set with attributes

The "Attributes for comparison" list is filled from the selected product attribute set. Before configuring automatic mode, select a set in the "Set of attributes" field of the Match by attributes section; otherwise, there is nothing to choose from. Don't confuse it with the "Selecting a set of attributes" field on the Attributes tab, which sets the attribute set of the block itself.

Selection of similar products​

Below Match by attributes is the Selection of similar products section. It defines which products to search for similar ones, which of them to allow into the block, and how to show variants of the same product.

A hint above the settings explains when they apply: only when the page requests the block together with a product. In that case, similar products are recalculated for that product on every request. If the request doesn't pass a product, the block returns a general list based on its rules, and the section's settings don't apply.

  • How important is a close price: a slider from 0 to 1 in steps of 0.1 (default 0.2). The higher the value, the further down the list products move if their price is far from the source product's price. 0 (labeled Ignore price) means price isn't considered at all; 1 is Strongly.
  • What kind of product should be to get into the block: required conditions. A product gets into the block only if all conditions are met. You set them the same way as in manual mode (attribute, condition, value). The "matches" condition compares against the source product's value: for example, "brand matches" keeps only products of the same brand in the block. Unlike manual-mode rules, required conditions apply to all languages at once.
  • Show as a single card products that match by: merges variants of the same product. Sneakers in seven sizes are seven catalog products, and without merging, the block shows the same model seven times. Select the properties that make products count as one item: the Title checkbox (product name) and attributes, with a separate list for each product attribute set. All selected properties must match. With Title, all sizes and colors of one model merge into one card; with Title and color, black and white separate, but sizes of the same color stay together. If nothing is selected, each product gets its own card.
  • Where to search for similar products: a category tree with search. If nothing is selected, similar products are searched in the same categories as the product itself. Selected categories replace this scope: similar products come only from them and everything inside them. The product's own section isn't added in that case; if you need it, select it too. Clicking a category selects it together with its subcategories.
Selection diagnostics

Below the settings, you see figures for the saved block: how many products the catalog has and how many distinct models remain after variants are merged (if the numbers are equal, there is nothing to merge in this catalog), and how many products will have fewer than two similar ones. This is a hint, not an error: you can save an incomplete block. After making changes, save the block to recalculate the figures.

Settings of the other mode are kept

When you switch Selection mode, the previous mode's settings are kept: a line under the switch says that the manual-mode rules (or the automatic selection settings) are saved and will come back if you switch the mode back.

Preview context​

The Context for preview section has a Test product ID field: the ID of an existing product that the user has "opened". The Found products preview at the end of the form is built for this product. The preview uses the saved block, so save the block after changing settings.

Additional settings in automatic mode​

Besides the Attributes for comparison and Minimum matches fields, automatic mode has:

  • Audience filter: a separate editor that defines who sees the block. See Audience Filter (opens in a new tab). The audience and the selection scope work together: the scope answers "where to look for similar products", and the audience answers "who sees what". Neither replaces the other; together they can only narrow the results.
  • Open in modal: a button that opens a preview window with the Basic, Explanation, and Investigate tabs. See Block preview (opens in a new tab).

Attributes​

The "Attributes" tab has two dropdowns for selecting a Template (opens in a new tab) and a Set of attributes (opens in a new tab).

After you select a set of attributes (opens in a new tab), fill in the values. In this example, it's the number attribute of type Integer, and we set it to 44.

Linked pages​

The Linked pages tab has a or screen search field and a tree of or screens. Use it to link the block you're editing to or screens. To link them, select the or screens in the or screens In the screenshot below, the block "new_block" is linked to the or screens "catalog" and "we".

Linked pages