Show product recommendations
Product recommendations are a good way to show customers products that are related to, or often purchased with, the current product. This gives customers visibility on products that might interest them, and potentially leads to an increase in sales for merchants.
In this tutorial, you'll learn how to show product recommendations in your theme.
To implement product recommendations, you'll use the following:
- The recommendations object
- The
/{locale}/recommendations/products
endpoint of the Product Recommendations API
Implementing product recommendations
Anchor link to section titled "Implementing product recommendations"In this implementation, the section content builds the general display by looping through each product returned through the products
attribute of the recommendations
object. However, this object isn’t populated when the section is initially rendered, so you need to use JavaScript to retrieve the populated section content through the section response of the Product Recommendations API.