Creating a Block of Similar Products
The second type of blocks in Headless CMS OneEntry is "For block of similar products". This block is intended for products grouped by common characteristics. For example, to gather all products within a certain price range.
1. Creating a Block
To create a block of type "For block of similar products", you need to enter the block name in the Name field, select "For block of similar products" from the dropdown list in the "Type" field, and enter a unique
2. Editing a Block
To edit a block, you need to click the "Edit" button in the "Actions" column of the blocks table.
For blocks of type "For block of similar products", there are three tabs available during editing:
- Basic data
- Attributes
- Linked pages
Basic data
The "Basic data" tab consists of the following forms:
-
Name - change the block name
-
Marker - change the
Markerof the block -
Individual settings:
- Quantity - change the number of items in the block (only integer values are allowed)
- Sorting type of block items - you can sort either by date or by name
- Sorting order of block items - three options: ascending, descending, and no sorting
- Number of items per row - change the number of items in one row of the block (only integer values are allowed)
-
Add condition - allows adding conditions for product search. Contains the following fields:
- Attribute - a dropdown list allowing you to select an attribute from all created sets of product attributes for the search.
- Condition - a dropdown list allowing you to select a condition for the search. Available filters:
- contains
- does not contain
- equal to
- not equal to
- more
- less
- contains any value
- does not contain a value
- NaN
- the same value as the selected attribute
- Value - an input field where you need to enter the value for the search. For example, if you want to filter all items where product_price is greater than 1000, you need to set the following condition:
- Categories - necessary for selecting pagesof type "Catalog" for the search based on the specified condition. Contains an input field for quick search ofpagesand a list of allpages. If nothing is selected, the search will be conducted across allpagesof type "Catalog".
- 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 removes previously created conditions for the current block
To apply the condition, you need to click the Add button
- Added conditions - a table containing previously added conditions. Consists of 6 columns:
- Attribute
- Condition
- Value
- Category
- Content language code
- Condition removal buttons
- Found products - a table containing items that match the specified condition.
Attributes
The "Attributes" tab contains two dropdown lists for selecting Template and Attribute Set.
After selecting the attribute set, you need to fill in the values. In our case, this is the attribute number, which has the type Integer. We will specify 44 as the value.
Linked pages
The Linked pages tab contains a search bar for
.