Skip to main content

Creating a Cart Complement Block

The Cart complement block is designed to recommend products that nicely complement what the user has already added to their cart. For example, a mouse for a laptop, or a belt or bag for a dress.

1. Creating the Block

To create a block of type "Cart complement," you need to enter the block name in the Name field, select "Cart complement" from the dropdown list in the "Type" field, and enter a unique

Marker
. After clicking the Add button, the block will appear in the blocks table.

2. Editing the Block

To edit the block, click the "Edit" button in the "Actions" column:

Edit

The CartComplementSettings settings screen is divided into the following sections:

  • Basic data
  • Cart driven settings
  • Audience filter
  • Preview (Open in modal)

Basic Data

Basic fields: Name and

Marker
.

Cart Driven Settings

The main section of the block settings. Next to each key field is an icon (HelpHint) with a detailed explanation. The following fields are available:

Recommendation Strategy (Strategy)

The algorithm by which recommendations will be selected:

  • Co-purchased — based on statistics of items ordered together. Suitable when you already have a sufficient amount of historical cart data.
  • Similar by attributes — based on matching product attribute values (brand, color, material, etc.).
  • Category match — top products from selected categories.
💡Tip

If you have little statistics, choose "Similar by attributes" or "Category match," otherwise the block may end up empty.

Exclude Items Already in the Cart

The checkbox "Exclude items already in the cart/favorites" — if enabled, items that the user has already added will not be included in the output. It is usually advisable to keep this enabled.

What to show if the main algorithm finds nothing:

  • Trending — fallback to show trending products.
  • None — show an empty output (the block will be hidden on the front end).

Audience Filter

To ensure that the block is only visible to certain user segments, use the audience editor — see Audience Filter.

Attributes

The "Attributes" tab contains two dropdowns for selecting a Template and a Set of Attributes.

Preview

The "Open in modal" button opens the Preview Modal — a modal with two tabs:

  • Basic — a table of products that the API will return with the current block settings.
  • Investigate — diagnostics: which audience rule was triggered, what warnings the system issued, and whether the fallback was activated.