Integrations / Magento 2

Algolia Recommend for Magento

Algolia Recommend lets you display recommendations from your product catalog on your website. If an item isn’t what users are looking for, they can quickly jump to similar or complementing items.

Check the pricing overview for more information about the available plans for Algolia Recommend.

Before you start

Before you can use Algolia Recommend with Magento, check these requirements:

  • Algolia extension for Magento Open Source and Adobe Commerce version 3.8 or higher
  • 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 via CSV to get started.

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

Configure the Frequently Bought Together recommendations in the Magento dashboard

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, you should 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.

Configure the Related Products recommendations in the Magento dashboard

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 Products model, you should remove the default related products from the user interface.

Set Enable on Cart Page to Yes to show Related Products recommendations on the shopping cart page.

You can configure content-based filtering in the Algolia dashboard.

To hide Magento’s default related products, set Remove The Magento Related Products Block to Yes.

Configure the Trending Items recommendations in the Magento dashboard

Display a list of trending items using the Trending Items model from Algolia Recommend on product detail, shopping cart, and other pages.

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 Products 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.

Add a Trending Items widget by using the widget type Algolia Recommend Trending Items.

Configure options for the trending items recommendations.

To configure this widget, add these details:

  • 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 facet name, select blue to only show blue products in your recommendations.

Change the layout for Frequently Bought Together

Override the file view/frontend/web/recommend.js from the original extension following Magento best practices. To change the layout, edit the frequentlyBoughtTogether block.

Override the file view/frontend/web/recommend.js from the original extension following Magento best practices. To change the layout, edit the relatedProducts block.

Customize styles

To customize the style of the recommendations, update view/frontend/web/internals/recommend.css following Magento best practices.

Did you find this page helpful?