Recently viewed products

Product page section

Theme retirement | Context is no longer available on the Shopify theme store. Theme support and updates for current users will end after May 18, 2024. Learn more here.

In the Product template, the Product recommendations section displays similar products to customers on product pages. Product recommendations let customers discover new products and can increase sales.

Recommendations are automatically generated based on products in related collections, products that are commonly purchased together, or similar product descriptions. Recommendations improve over time with more customer and product information. You can customize product recommendations by downloading Shopify's Search & Discovery app.

Set up section

Follow the steps to set up the Recently viewed products section. You can customize the section headings, the number of recommend products, and the section style.


In your theme editor (Customize):

  1. Click (+) Add section and select Recently viewed products from the list.

  2. Click the Recently viewed products section to open the settings.

  3. Change the Heading text and alignment.

    The following image outlines the layout differences between Left, Center, and Right aligned:

  4. Choose the amount of Rows and Products per row

    Using the Rows and Products per row sliders, you can create very different looking recently viewed products sections.

  5. To make product images a uniform shape and size, select the Image aspect ratio to crop your images to Square, Landscape, or Portrait.

    The default Natural setting will display the original orientation of your image.

  6. (Optional.) Choose to enable the Outline section style for an alternate look.

    This option removes the section background and adds a border around the section, which uses your store's border color setting.

  7. Click Save.

Settings reference

Click the Recently viewed products section to find the following settings.



Add heading text to show a section title.

Columns per row

Change the amount of products displayed per row. You can choose between 2 and 4 columns. On mobile devices, this section will become click-through carousel with one column.

Image aspect ratio

Use this setting to automatically crop images to a specific aspect ratio. Choose from Square (1:1), Landscape (3:2), or Portrait (2:3) aspect ratios. Choose Natural if you do not want your images to be cropped.

Related links

Product template Complementary products Recommended products

Last updated