Before you begin
Before using Algolia Recommend with Magento, check the following requirements:- Algolia extension for Magento Open Source and Adobe Commerce version 3.8 or later.
- You’re sending click and conversion events. Algolia Recommend relies on click and conversion events to continuously improve its recommendations. You can also upload events from a CSV file.
-
You have trained Recommend models.
You can check the status of your models on the Algolia Recommend page in the dashboard, in the Existing models section.
Configure Algolia Recommend for Magento
In your Magento dashboard, go to Stores > Configuration > Algolia Search > Recommend Products Settings. You can enable these recommendation models:Frequently Bought Together

- Set Enable on PDP to Yes to show recommendations from this model on product detail pages below the main product information. If you’re using recommendations from Algolia’s Frequently Bought Together model, remove the default upsell products from the user interface.
- Set Enable on Cart Page to Yes to show Frequently Bought Together recommendations on the shopping cart page below the More choices section.
Remove the Magento upsell products block
To hide Magento’s default upsell products, set Remove The Magento Upsell Products Block to Yes.Related Items

- Set Enable on PDP to Yes to show recommendations from this model on product detail pages. The recommendations appear below the main product information after the Frequently Bought Together recommendations (if active). If you’re using recommendations from Algolia’s Related Items model, remove the default related items from the user interface.
- Set Enable on Cart Page to Yes to show Related Items recommendations on the shopping cart page.
You can configure content-based filtering in the Algolia dashboard.
Remove the Magento related items block
To hide Magento’s default related items, set Remove The Magento Related Items Block to Yes.Trending Items

- Set Enable on PDP to Yes to show the recommendations from the Trending Items model on product detail pages. The recommendations appear below the main product information after the Frequently Bought Together and Related Items recommendations (if active).
- Set Enable On Cart Page to Yes to show the Trending Items recommendations on the shopping cart page.
- Set Enable Trending Items Widgets to Yes to show the Trending Items recommendations on the CMS pages where the Trending Items widget is present.
Configure the Trending Items widget
Add a Trending Items widget with the Algolia Recommend Trending Items widget.
- Number of Trending Items. Select the number of recommendations you want to show in the widget.
- Facet name. Select a facet for filtering the recommendations. For example,
color
. - Facet value. Select a value corresponding to the Facet name. For example, if you selected
color
as the facet name, selectingblue
will only show blue products in your recommendations.
Looking Similar

- Set Enable on PDP to Yes to show similar-looking items at the bottom of the product detail page.
- Set Enable On Cart Page to Yes to show similar-looking items on the cart page.
- Set Enable Looking Similar Widgets to Yes to show similar-looking items on the CMS or other pages where widgets can be added.
Configure Looking Similar widgets
Create a widget with the Algolia Looking Similar Items widget.
- Number of Looking Similar Items. Select the number of similar-looking items you want to show in the widget. Default is 6.
- Product IDs (required). Enter product IDs (separated by commas).
Change the layout of Algolia Recommend models
Frequently Bought Together, Related Items and Trending Items
Override the fileview/frontend/web/js/template/recommend/products.js
from the original extension following Magento best practices.
Add fallback recommendation
Fallback recommendations are shown when the Algolia Recommend model doesn’t return any recommendations. This can happen when a product doesn’t have enough events associated with it. You can show fallback recommendations withfallbackParameters
and fallbackComponent
.
To add fallback recommendations, override the file view/frontend/web/js/recommend.js
from the original extension following Magento best practices.
The fallbackParameters
object has search parameters to use as an alternative when no recommendations are available.
Add fallbackParameters
to the following files as needed:
For example:
JavaScript
fallbackComponent
is used for rendering when no recommendations are returned. Add fallbackComponent
to the following files as needed:
For example:
JavaScript
Customize styles
To customize the style of the recommendations, updateview/frontend/web/css/recommend.css
.