Automatic Related Products for Magento 2

Kowal Flexible Product Recommendations for Magento 2 is a module for stores and agencies that need more than standard related product lists.
SKU
M2-AUTOMATIC-RELATED-PRODUCTS
€61.50
Email to a Friend

Enquire about this product

Description / Automatic Related Products for Magento 2

MAGENTO 2 · RECOMMENDATIONS · PROFILES · MERCHANDISING

Match recommendations to the product and the buying stage.

Kowal Related Products Profiles

Design recommendation profiles based on attributes, conditions, and filters. Show matched lists on the product page, in the cart, and in checkout, and supplement or replace native Magento lists.

Conditions and attributes · Grid, Slider, Compact · Related, Upsell, Crosssell

HOW IT WORKS IN PRACTICE

01 · Create a profile
You choose the scope, conditions, and presentation method.

02 · The engine selects products
It applies context, matches, and target filters.

03 · The list appears in the store
It renders in the location selected for the profile.

What does your store gain?

Explore the module features, use cases, and settings.

Meet the module

Build intelligent product recommendations in Magento 2 without being limited to rigid related, upsell, and cross-sell relationships.

Kowal_RelatedProductsProfiles is a module that lets you design your own recommendation scenarios based on profiles, product attributes, activation conditions, target filters, and flexible embedding in the store layout. As a result, recommendations stop being a static list and become part of the store’s sales strategy.

Turn ordinary product lists into real sales scenarios

In standard Magento, related products are often too simple to support more demanding implementations. A store may want to show different products on the product page, different ones in the cart, and different ones in checkout. Sometimes a list should work only for selected customer groups, only during a seasonal campaign, or only when a product meets specific catalog conditions.

This module was built exactly for those cases.

Instead of manually connecting products, you create a recommendation profile. The profile defines:

  • where it should work,
  • for which product it should activate,
  • how to select target products,
  • how to narrow and sort them,
  • how they should look,
  • where they should be rendered,
  • and whether they should feed native Magento lists.

One tool, many implementation areas

The module works in the most important areas of the store:

  • on the product page,
  • in the cart,
  • in checkout,
  • in native Related Products blocks,
  • in native Upsell Products blocks,
  • in native Crosssell Products blocks.

This means one profile can become part of several different merchandising scenarios, and the implementation team does not need to build separate logic for each place in the store.

Profiles that adapt to your catalog

The module’s greatest strength is that recommendations can be built not only manually, but also dynamically based on product attributes.

You can create profiles that:

  • select products from the same collection,
  • find products with the same graphic,
  • show products from the same category,
  • promote another product base related to the viewed product,
  • narrow results to specific product types,
  • work only for selected store views and customer groups.

Example?

A customer views a rashguard with the HALLOWEEN 25 graphic. The profile can automatically find products with the same graphic in other product lines, such as shorts, leggings, or accessories. Another profile can use the same product as context in the cart and suggest that the customer complete the order with products from a selected assortment base.

Create recommendations based on conditions, not exceptions

Each profile can have its own:

  • Activation Conditions,
  • Matching Rules,
  • Target Product Filters,
  • sorting,
  • product limits,
  • rendering variant,
  • activity time range.

In practice, this gives you tremendous freedom.

You can build a profile that launches only for products with the brand = Nike attribute, only in the B2C store, only for retail customers, and only during a specific campaign. You can also build a profile that uses a product from the cart as a reference point and suggests add-ons based on shared catalog features.

This is no longer a simple product list. It is a rule-based recommendation engine that can be adapted to the store’s real sales model.

Choose which product should be the context

On the product page, the context is the current product. But in the cart and checkout, that answer is not always obvious. That is why the module lets you define the Context Strategy, meaning the method for selecting the context product.

You can decide that profiles should be based on:

  • the first product in the cart,
  • the most recently added product,
  • the product with the highest price.

This flexibility makes a big difference in projects where the customer adds several different products to the cart and recommendations must follow specific business logic.

Separate scenarios for the product page, cart, and checkout

What works well on the PDP does not always make sense in the cart. The module lets you separate these scenarios without multiplying separate extensions.

On the product page, you can display a list of products from the same collection or the same style. In the cart, you can promote add-ons that increase order value. In checkout, you can prepare a simplified, more cautious list of products supporting cross-sell.

All of this within one profile system.

Feed native Magento lists: append or replace

Not every store wants to give up native Magento mechanisms right away. That is why the module supports integration with:

  • Related Products,
  • Upsell Products,
  • Crosssell Products.

Each profile can work in one of two modes:

  • append
    keeps native products and adds module results to them,
  • replace
    completely replaces the native list with products from the profile.

This is a very convenient implementation solution. You can start with a light extension of existing Magento lists and later move to full recommendation control from the profile level.

Render exactly where you want

A major advantage of the module is the ability to control the rendering location using XML fields assigned to the profile.

Instead of adapting the module to one rigid layout, you can embed the list exactly where the project needs it:

  • below the product description,
  • below the price,
  • below the purchase form,
  • in an additional section,
  • in a custom theme container,
  • in a location resulting from a custom frontend layout.

This is especially important in stores based on extensive or heavily modified themes. The module does not force you into one layout. You decide where and how the profile should be embedded.

Three presentation variants on the frontend

The module does not stop at product selection logic. It also lets you match the list presentation to the page type and implementation style.

Available variants:

  • Grid,
  • Slider,
  • Compact.

You can use the same recommendation engine both for an expanded section on the product page and for a tight list in the cart or a more compact module in checkout.

You also get control over view elements:

  • product name,
  • price,
  • regular price,
  • short description,
  • add-to-cart button,
  • image role.

Creating new profiles is clear and scalable

The module was built so that an implementation team or agency can develop additional scenarios without rebuilding the entire solution.

When creating a new profile, you configure:

  • basic administrative information,
  • placements and scope of operation,
  • store views and customer groups,
  • context strategy,
  • activity date range,
  • activation conditions,
  • matching rules,
  • target product filters,
  • sorting and display method,
  • integration with native Magento lists,
  • embedding via XML.

This means that the next merchandising scenario does not immediately require another custom module. Very often, another profile is enough.

1. Same graphic, different product base

A customer views a product from a specific line. Based on matching rules, the module finds products with the same graphic but from other assortment families. This is a great scenario for lifestyle, sports, and fashion brands.

2. Cross-sell based on a cart product

The customer already has a selected product in the cart. The profile uses it as context and selects add-ons that match the purchase but are not manually connected as native cross-sell.

3. Time-limited campaign

Need recommendations that work only during a specific sales campaign? Simply configure a profile with From Date and To Date, without building additional logic.

4. Replacing native upsells

If standard Magento upsells are too simplified, the profile can take over this role and work in replace mode, offering much more precise product matching.

5. Integration with a custom theme

Thanks to XML fields, the list can be embedded exactly where the project frontend requires it, without building another dedicated layout extension.

Who this module is for

Kowal_RelatedProductsProfiles will be especially valuable for:

  • Magento 2 implementation agencies,
  • software houses developing e-commerce stores,
  • merchants who want to make recommendation logic independent from manually maintained relationships,
  • projects with an extensive catalog and many business attributes,
  • stores using custom themes and complex layouts.

What you gain

When you purchase the module, you get not just another product list, but a tool for designing your own recommendation scenarios in Magento 2.

This solution:

  • increases implementation flexibility,
  • organizes merchandising logic,
  • reduces the need to write additional code exceptions,
  • makes better use of catalog attributes,
  • lets you grow the store without rebuilding the entire recommendation mechanism.

If the standard related, upsell, and cross-sell options are too limited for your project, Kowal_RelatedProductsProfiles provides a control layer that Magento simply does not have by default.

Current package and additional view control

This description applies to the Kowal_RelatedProductsProfiles engine, available as kowal/module-related-products-profiles. It is a separate package from the earlier Kowal_AutomaticRelatedProducts. During implementation, choose the correct package for the described functionality.

The current code also allows native Related, Upsell, and Crosssell assignments to be rendered in the module template without changing product selection. Appearance settings are available per list, along with controls for moving Related/Upsell blocks.

Implementation requirements

Composer declares PHP in the ^8.1, ^8.2, or ^8.3 ranges and a dependency on kowal/base. After installation, enable the module, create a profile, and check its conditions, time range, cart context, and selected presentation location.

Adjust XML embedding and checkout behavior to the theme you use. Recommendations come from rules and catalog data; the module does not require an AI model for product selection.

Installation via Composer

Package kowal/module-related-products-profiles, module Kowal_RelatedProductsProfiles. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment according to the store’s process.

From configuration to result

1. Create a profile
You choose the scope, conditions, and presentation method.

2. The engine selects products
It applies context, matches, and target filters.

3. The list appears in the store
It renders in the location selected for the profile.

Same graphic, complementary products

A customer views a rashguard with the HALLOWEEN 25 graphic. The profile compares the graphic attribute and suggests matching shorts, leggings, or accessories from other assortment families.

A second profile can use a product from the cart to suggest completing the order.

Grow recommendations based on catalog data

Want to adapt the module to your store? Ask about implementing Kowal Related Products Profiles and discuss the configuration or required extensions.

More Information

Purchase information

See the module DEMO

username: related
password: M2Related

Theme compatibility Luma / Blank, KOWAL

Change Log

Version: 1.1.22

22.05.2026

Added

  • Added sample profile installation data patch with three default profiles:
    • related
    • crossel
    • upsell
  • Added native product-page block position management for Related and Upsell blocks.
  • Added admin dropdowns for Related and Upsell block positions.
  • Added supported product-page position targets:
    • content
    • content.aside
    • sidebar.main
    • sidebar.additional
    • product.info.main
    • product.info.media
    • product.info.details
  • Added related_block_position and upsell_block_position profile fields.

Changed

  • Native Magento Related, Upsell and Crosssell injection now replaces the native block output with module-rendered output when the matching checkbox is enabled.
  • Append mode now renders native Magento products plus profile products inside the module output.
  • Replace mode now renders only profile products inside the module output.
  • Related Products defaults to replace mode.
  • Admin profile action buttons were moved to the top of the form in Magento-style order:
    • Back
    • Delete
    • Save and Continue
    • Save Profile
  • Admin ACL/menu integration was aligned with Kowal_Base menu structure:
    • Kowal.co > Modules > Related Product Profiles > Profiles
    • configuration remains under Magento Stores configuration.

Fixed

  • Prevented duplicate storefront rendering when a profile is handled by a native Magento list replacement.
  • Fixed limited-admin-role visibility for the Profiles menu entry by wiring menu and ACL resources to the Kowal modules tree.
  • Preserved native Magento list products for Append mode while avoiding recursion during native item collection.

Module Installation Instructions

Module installation and configuration

This document describes the installation of the Kowal_RelatedProductsProfiles module and the basic configuration of a product recommendation profile in the Magento admin panel.

Requirements

  • Magento 2 with Composer module support.
  • PHP compatible with the project: ^8.1, ^8.2, or ^8.3.
  • The base module kowal/base installed, because the admin menu uses the Kowal.co > Modules structure.
  • Administrative access to the Magento CLI.

Installation via Composer

  1. Add the module repository:

You will receive the Composer repository access credentials, customer email address and license token, by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the token you received. Run the commands in the Magento root directory.

composer config repositories.kowal composer https://repo.kowal.store
  1. Configure the access credentials for the Kowal Composer repository:
composer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'
  1. Install the module:
composer require kowal/module-related-products-profiles
  1. Enable the module:
php bin/magento module:enable Kowal_RelatedProductsProfiles
  1. Run the database update:
php bin/magento setup:upgrade

During setup:upgrade, the module creates the profiles table and runs a data patch with three sample profiles: related, crossel, upsell. The patch does not overwrite existing profiles with the same codes.

  1. In production mode, rebuild dependency injection:
php bin/magento setup:di:compile
  1. Clear the cache:
php bin/magento cache:flush

Basic global configuration

Go to:

Stores > Configuration > Kowal > Related Product Profiles

Set:

  • Enable Frontend Output: Yes
  • Enable Debug Logging: No in production, Yes only when diagnosing profile behavior

Save the configuration and clear the cache if Magento asks you to do so.

Administrative permissions

The module adds ACL resources for profiles and configuration.

Access to the profile list:

Kowal > Modules > Related Product Profiles > Profiles

Access to configuration:

Stores > Settings > Configuration > Related Product Profiles Configuration

For a demo user who should manage only profiles, assign the Profiles permission. If the user should also change the global module enable setting, assign the configuration resource as well.

Where to manage profiles

The profile list is available in the menu:

Kowal.co > Modules > Related Product Profiles > Profiles

On the list, you can add a new profile, edit an existing one, or delete a profile.

The example below creates a profile that replaces the native Magento Related Products block on the product page. Products will be selected by the same attribute_set_id, meaning from the same attribute set as the product viewed by the customer.

1. Create the profile

Go to:

Kowal.co > Modules > Related Product Profiles > Profiles

Click Add New Profile.

2. General section

Set:

  • Name: Related Products
  • Code: related
  • Is Active: checked
  • Sort Order: 0
  • Placements: select Product Page
  • Store Views: select All Store Views
  • Customer Groups: select All Customer Groups
  • Context Strategy: First matching item
  • From Date: empty
  • To Date: empty

Notes:

  • For the product page, the context is always the currently viewed product.
  • Context Strategy is mainly practical for the cart and checkout.
  • Code must be unique.

3. Activation Conditions section

Add a condition:

Attribute CodeOperatorValue
statusEquals1

Meaning:

  • The profile will run only when the context product is active.
  • If the condition is not met, the entire profile will be skipped.

4. Matching Rules section

Add a rule:

Source AttributeTarget AttributeOperatorRequiredEmpty Value PolicyDefault Value
attribute_set_idattribute_set_idEqualscheckedSkip Ruleempty

Meaning:

  • The module will retrieve attribute_set_id from the current product.
  • Then it will find products with the same attribute_set_id.
  • Required means that the target product must satisfy this rule.

Alternative rule examples:

  • brand -> brand, operator Equals: products from the same brand.
  • category_ids -> category_ids, operator Category Intersects: products from at least one shared category.
  • color -> color, operator Equals: products in the same color.

5. Target Product Filters section

Add a filter:

Attribute CodeOperatorValue
statusEquals1

Meaning:

  • Only active products will be shown in the results.

You can optionally add a visibility filter:

Attribute CodeOperatorValue
visibilityIn List2,3,4

6. Sorting & Display section

Set:

  • Sort Attribute: entity_id
  • Sort Direction: DESC
  • Secondary Sort Attribute: empty
  • Secondary Sort Direction: None
  • Title: Related Products
  • Subtitle: empty
  • Products Limit: 8
  • Template Variant: Slider
  • Image Role: category_page_grid
  • Show Price: checked
  • Show Old Price: unchecked
  • Show Add To Cart: checked
  • Show Product Name: checked
  • Show Short Description: unchecked
  • Show Badges: unchecked
  • Hide If Empty: checked
  • Exclude Current Product: checked
  • Exclude Quote Products: checked
  • Exclude Out Of Stock: checked

Meaning of the key fields:

  • Template Variant controls the appearance of the list: Grid, Slider, or Compact.
  • Products Limit limits the number of products in the results.
  • Exclude Current Product prevents the currently viewed product from being shown in the results.
  • Exclude Out Of Stock removes unavailable products.

7. Native Magento Lists section

For Related Products, set:

  • checkbox Related Products: checked
  • Mode: Replace
  • Position: Magento default position

Meaning:

  • Selecting the checkbox means the module takes over the native Magento Related Products block.
  • Replace means that only products from the profile will be shown in the taken-over block.
  • Append means that the module will show native Magento products plus products from the profile.
  • Position lets you move the block to another location on the product page.

Sample positions:

  • Magento default position: leaves the block in the location set by the Magento theme.
  • sidebar.additional: moves the block to the additional sidebar.
  • sidebar.main: moves the block to the main sidebar.
  • content: moves the block to the main page content.
  • content.aside: moves the block to the side content area.
  • product.info.main: moves the block to the main product information column.
  • product.info.media: moves the block to the product gallery area.
  • product.info.details: moves the block to the product details or tabs area.

If the selected container does not exist in the current theme, Magento will leave the block in the default location.

For Upsell Products and Crosssell Products, leave the checkboxes unchecked in this example.

8. Layout XML section

For this example, leave the fields empty:

  • Product Page XML: empty
  • Edit Cart XML: empty
  • Checkout XML: empty

You do not need to add XML if you use the Native Magento Lists section. XML is useful when the profile should be rendered as an additional module block outside native Magento lists.

9. Save the profile

Click:

  • Save Profile to save and return to the profile list
  • Save and Continue to save and stay on the form

After saving, clear the Magento cache if the result is not immediately visible on the frontend.

Example Upsell configuration in the sidebar

If you want to move Upsell Products to sidebar.additional:

  1. In Placements, select Product Page.
  2. In Native Magento Lists, check Upsell Products.
  3. Set Mode:
    • Append if you want to show native Magento upsells plus profile products.
    • Replace if you want to show only profile products.
  4. Set Position: Additional sidebar - sidebar.additional.
  5. Select Template Variant: usually Compact works well in the sidebar.

Example Crosssell configuration in the cart

For crosssell:

  1. In Placements, select Edit Cart.
  2. In Native Magento Lists, check Crosssell Products.
  3. Set Mode: most often Replace.
  4. Position is not available for crosssell, because positioning currently applies only to blocks on the product page.

Diagnostics

If the profile does not display products:

  1. Check whether the module is enabled in the configuration.
  2. Check whether the profile has Is Active checked.
  3. Check whether Placements matches the place where you are testing the profile.
  4. Check the conditions in Activation Conditions.
  5. Check whether the context product has the attribute values used in Matching Rules.
  6. Temporarily disable Exclude Out Of Stock if you are testing on products without stock levels.
  7. Enable Enable Debug Logging only for the duration of diagnostics.

Commands after deploying changes

After updating the module, run:

php bin/magento setup:upgradephp bin/magento cache:flush

In production mode, also run:

php bin/magento setup:di:compile
Press to skip carousel

We found other products you might like!

Write Your Own Review
You're reviewing: Automatic Related Products for Magento 2
Your Rating:
Price
Quality
Support
loader
Loading...

You submitted your review for moderation.

Questions and Answers

Question
Does the module allow related products to be displayed automatically on the product page without manual assignment?
Answer
Yes — the module allows you to define rules or conditions (e.g., attributes, categories, tags) and, based on them, automatically select related products instead of assigning them manually.
Question
Can I choose how many related products are shown to the customer?
Answer
Yes — in the configuration, you can typically specify the maximum number of related products displayed in the block, which helps optimize the page layout and user experience.
Question
Can the related products block be displayed not only on the product page, but also, for example, on the category or cart page?
Answer
Although the main use is on the product page, many extensions of this type (by analogy) also allow blocks to be displayed on other pages—it is worth checking the documentation for the specific version of the module.
Question
Does installing the module require overwriting Magento core or theme files?
Answer
No — the module works as a standard extension for Magento 2 and does not require modifying the system core files or the theme. (Applies to a standard installation)
Question
Can rules be set for selecting related products — for example, products from the same category or with a similar price?
Answer
Yes — the module supports configuring rules or conditions for selecting related products (e.g., the same categories, tags, or price range).
Question
Does the module support multilingual/multi-store shops?
Answer
Usually yes — the module is designed for Magento 2 with multiple store views, which allows you to customize the appearance and conditions for different languages/stores.
Question
Does it affect the store’s performance if I have a very large product database?
Answer
Minimally — the module selects products automatically and displays them on the page, but like any additional query or block, it is worth testing its operation in a test environment, especially with a large number of products.
Question
Can I exclude specific products or categories from automatic selection?
Answer
Yes — in the module configuration, you can specify exclusion conditions (e.g., sale products, specific categories) for the related products block.
Question
Can you set the title of the related products block that the customer will see?
Answer
Yes — the module usually allows you to customize the title or heading of the block (e.g., “See also,” “Similar products”) in the store’s admin panel.
Question
Do I receive support and updates after purchasing the module?
Answer
Yes — the manufacturer states that the modules are covered by technical support and updates.
Update cookie preferences