How to Create Related Products Rules in Magento 2?

Except for the plenty of other sales approaches and marketing tips, related products stay an old but gold, and effective way to increase conversions. Magento provides you with an easy way to add related products that requires nothing but plenty of manual work. 

Since not everyone is willing to spend too much time on assigning related products, cross-sells and up-sells there is the Magento 2 Automatic Related Products Extension.

It allows you to set up related products based on multiple conditions. 

So, in this guide, you'll learn how to create Magento 2 related product rules for more targeted product recommendations.

To create related product rules in Magento 2:

1. Navigate to Marketing > Automatic Related Products > Rules and press the Add New Rule button.

Manage Auto Related Products Rules

2. Fill out General Rule Information.

  • Enable the Rule.
  • Give it a Name and set a Description with internal notes in case you have multiple similar rules and need to quickly differentiate between them.
  • Set the auto-related products rule Priority.

Note: it defines which rule will be applied first in case there are 2 or more rules that apply to the same products or categories. 

e.g. if you have Rule 1 with priority 10 and Rule 2 with priority 8 and both of them apply to the same product, Rule 2 will be applied to the related products block. In case two rules have the same priory 10, the rule with the lowest ID in the rules grid will be applied.

  • Select what Customer Group the related product blocks will be displayed to.
  • Choose the Store View where the rule applies.
  • Set the time during which the rule should be enabled in the Date From/Dave To field.

New Auto Related Products Rules

3. Specify Where/When to Display related products.

Define the Block Position and Merge Type (in case you want to insert related products, cross-sells, or up-sells into native Magento blocks). You can choose up to 20 related product block positions.

Besides, you have to set the Conditions which the related products block will be displayed under. It could be either Product, Shopping cart, or Page Attributes.

Magento Related Block Position

4. Set What Products to Display.

In this section, you define what products you want to be displayed in the Magento related products block. The conditions here are based only on product attributes like anything from size, sale, color, material, and any custom attribute.

Related Products to Display in Magento

You can also preview the products to see whether they fit your requirements. 

Preview Magento Related Products

One more useful option that allows you to improve product relations is the Same As Condition. It allows you to display items on the product page based on the same product attributes.

e.g. you can display only products from the same category or with the same size or color.

Same as Conditions for Related Products

It opens up plenty of opportunities to create more detailed and personalized related product blocks.

5. Select the Display Modes if you're setting up related products for product pages.

You can display products with a higher or lower price than the product this rule is aimed for. Besides, you can set up the Who Bought This Also Bought and Who Viewed This Also Viewed modes that are based on a smart extension algorithm.

How to Display Related Products on Product Page

6. Configure the Display Settings to define how related products will be displayed in a block.

  • Decide what to Sort products by price, date, name, or randomly.
  • Enable the Display "Add To Cart" button for more engaging blocks.
  • Specify the Number of Products To Display.
  • Select whether to Display "Out Of Stock" Products. This option is disabled by default.
  • Select a Template for the product block.

Note: except for the default template, you can choose to display custom, compare products and bundle pack templates.

related products display settings

Once you Save the auto-related product rules, go to the storefront to check the related product rule on the product pages. 

Who Bought This Also Bought Block

According to the conditions you've set up, there should be displayed corresponding products. However, as you might have noticed some options are marked as (Plus) which means they go with the Automatic Related Products Plus Extension

If you want to configure auto-related products to be displayed fast and easily, Auto Related Products are going to provide that. However, for more extended and flexible rules, the Plus edition is what you need.

You can check out the auto-related product rules on our live demo and tweak the options to see how simple it is.