We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies.
Checkout as a new customer
Checkout using your account
User Guide - Auto Related Product for Magento 2
General Configuration
General Configuration
Admin can configure the Auto Related Product settings under the Store > Configuration > Dolphin > Auto Related Products.
General Settings

Enable/Disable: The admin can Enable/Disable extension for a specific store where this extension is not needed.
Manage Auto Related Product Rules
Manage Auto Related Product Rules
Admin can manage Auto Related Product Rules from Marketing > Dolphin - Auto Related Products > Manage Auto Related Product Rules.
Auto Related Product Rules

- The grid Includes Rule Name, Block Type, Block Position, Sort Products By, Store View, Priority, Status, and Created Date.
- Admin can see this basic information about the rules directly from the grid.
- Action
- Action that can be performed by the admin to manage auto related product rule.
- Edit: Click on the edit link to edit the rule you want.
- Delete: Click on the delete link to delete the rule you want.
- Mass Action
- Delete: Delete mass action that can be performed by the admin to delete mass auto related product rule.
How to Create Rule for Auto Related Product
How to Create Rule for Auto Related Product
To create a new rule go to Marketing > Dolphin - Auto Related Products > Manage Auto Related Product Rules.
Add New Rule

Click on the Add New Rule from the top right corner to add a new related product rule.
Rule Perform

1. Rule Information
The following rule information can add for automatic related product rules.
- Enable: Admin can enable/disable a particular auto related product rule.
- Rule Name:
- Add rule name for automatic related product rule.
- This is a required field.
- Customer Group:
- Select single or multiple customer groups to apply rules for them.
- Only selected customers will be applied to the rule.
- This is a required field.
- Store View:
- Select the store view on which admin want to apply the auto related product rule.
- Only selected store views will be applied to the rule.
- This is a required field.
- Priority:
- Set the priority for the automatic related product rule.
- This is a required field and enter a number greater than 0 in this field.
2. Conditions
- Product Selection Condition:
- Set the condition to apply the auto related product.
- Only products that satisfy these conditions will be applied to the rules.
- Product Display:
- Set the condition to display the product based on condition.
- Only products that satisfy the condition will be displayed to the products.
- You can apply conditions with product attributes or conditions combination.
- All conditions apply to product collection. Therefore, it is an automatically applied rule and does not require manual product selection.
3. How to display
- Block Type:
- You can set block type such as Related Block, Upsell Block or Cross-sell Block.
- Block Position:
- You can set block position as per your requirements such as Instead of Native Block, Add to Native Block, Before Native Block or After Native Block.
- Block Title:
- Set block title as per your requirement. If you want to display the default title then you can leave blank.
- Block Layout:
- Set layout with grid/slider view.
- Display “Add To Cart” Button:
- You can set the show/hide add to cart button.
- Display “Review Stars”:
- You can set the show/hide rating stars.
- Max Products To Display:
- You can set the maximum number of producs.
- Sort Products By:
- You can set the sorting by products such as Bestsellers, Newest, Latest, Price High to Low or Price Low to High.
GraphQL/REST API
GraphQL/REST API
Use the auto related product query to retrieve information about the particular rule.
You can get automatic related products in GraphQL with two parameters.
- Ids:
- This parameter is the current product id.
- blockType:
- This parameter contains different types such as before_related, before_upsell, before_crosssell, after_related, after_upsell, after_crosssell, related, upsell and crosssell.
- The related, upsell and crosssell contains Instead of Native Block and Add into Native Block. The block with the highest priority will be the first to perform.
- If you want before/after block collection then set before/after native block with blockType such as before_related, before_upsell, before_crosssell, after_related, after_upsell, and after_crosssell.
GraphQL Example
Please check the following example for Instead of Native Block and Add Into Native Block with a native related product block.
In this example, Instead of Native Related Block rule is the priority is one so it will perform first.
Request:
query getautorelatedproducts { GetAutoRelatedProducts(ids: [1] , blockType: "related") { rule_id rule_status rule_name rule_priority block_type block_position block_title block_layout show_addtocart show_reviews max_prd sort_prd_by prd_ids{ id } } }
Response:
{ "data": { "GetAutoRelatedProducts": [ { "rule_id": 1, "rule_status": 1, "rule_name": "Instead of Native Related Block", "rule_priority": 1, "block_type": "related", "block_position": "instead", "block_title": "Similar Products", "block_layout": "1", "show_addtocart": 1, "show_reviews": 1, "max_prd": 5, "sort_prd_by": 3, "prd_ids": [ { "id": 2 }, { "id": 3 }, { "id": 4 }, { "id": 5 }, { "id": 6 }, { "id": 7 } ] } ] } }
REST API Example
Please check the following example for Before Native Block with a before native cross-sell product block.
Request URL:
yourdomain.com/rest/V1/autorelatedproductsdata?ids=[14]&blocktype=before_crosssell
Response:
[ { "rule_id": "3", "rule_status": "1", "rule_name": "Before Native Cross-sells Block", "rule_type": null, "customer_group": "32000", "storeviews": "0", "rule_priority": "1", "block_type": "crosssell", "block_position": "before", "block_title": "Cross-selling Products", "block_layout": "1", "show_addtocart": "0", "show_reviews": "0", "max_prd": "6", "category_ids": null, "sort_prd_by": "2", "show_out_prd": null, "create_date": "2021-02-08 09:04:06", "prd_ids": [ { "id": "68" }, { "id": "84" }, { "id": "100" }, { "id": "116" }, { "id": "132" }, { "id": "148" }, { "id": "164" } ] } ]
prd_ids field displays all product ids based on conditions in both examples.
Live Demo
Live Demo
Contact Us
Contact Us
If you want customization or more functionality in our Extension, feel free to contact us. We are eager to shape your system with our effective solutions.!!!