cancel
Showing results for 
Search instead for 
Did you mean: 

Related product rules are not working

Related product rules are not working

Hello everyone,

I am working on Magento 2.3.5. 
On Product detail page i want to display related products rules which is created from Marketing->Related Product rules. 

Same rule is working on one website and on another it is not working for configurable products only. After lot of debugging i found some issue in core files.

Magento\TargetRule\Block\Catalog\Product\ProductList\AbstractProductList
 on line no. 322

foreach ($collection as $item) {
$items[$item->getEntityId()] = $item;
}
$item->getEntityId() is not working for me. i have used $item->getRowId() as well but not working. Although $collection is having data when i print collection.

Can anybody help me in this please. 


Best Regards
Ankita

2 REPLIES 2

Re: Related product rules are not working

If you manage magento store you have the best place to promote your products. You can add product in blog content or add related products at the bottom of the post.

You encourage people to view your catalog and purchase your products.

However, when you have a lot of blog posts it can be time-consuming to look for products and add them manually for each blog post. That is why there is a related product rule to help you out and here you will learn how to configure it. Walgreens Employee Benefits Login

Note: you can set up related product rules only if you use  

Re: Related product rules are not working

Related Products, Up-sells, and Cross-sells are a powerful tool in Magento. Do I find yourself spending a lot of time managing Product Relationships for your business? 

 

advancedmd