> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/volume-themes/sections/products/product-recommendations-and-recently-viewed-products.md).

# Product Recommendations & Recently Viewed Products

Automatically populated product sections — Shopify's recommendation engine or the shopper's own browsing history.

Two sections that automatically populate with products — no manual picking — using either Shopify's recommendation engine or the shopper's own browsing history.

* **Product Recommendations** — pulls from Shopify's recommendation engine based on the current product.
* **Recently Viewed Products** — pulls from the shopper's own browsing history.

***

### Product Recommendations

Pulls from Shopify's native recommendation engine based on the current product — no manual selection.

#### How to add

1. In Theme Editor, open the **Product** template.
2. Click **Add section** and select **Product Recommendations**.

#### Good to know

* Recommendations come from Shopify's own engine (based on purchase and view data) — there's no way to hand-pick which products appear here.
* This section needs a current product to base recommendations on, so it only works on the Product template.

#### Settings

<details>

<summary>Settings</summary>

| Setting               | What it does                                   |
| --------------------- | ---------------------------------------------- |
| Layout                | Grid or **Slider (default)**                   |
| Center text           | **Defaults to on**                             |
| Desktop item width    | Slider mode — **defaults to 4**                |
| Product card settings | Same shared settings as Featured Products      |
| Information card      | Same optional promo block as Featured Products |

</details>

***

### Recently Viewed Products

Near-identical schema to Product Recommendations, but pulls from the shopper's own browsing history (stored via localStorage/cookies) instead of Shopify's recommendation engine.

#### How to add

1. In Theme Editor, click **Add section** on any template.
2. Select **Recently Viewed Products**.

#### Good to know

* This section reads from the shopper's browser storage, not their account — it's empty for first-time visitors and won't sync across devices.
* The default item width (6) is wider than Product Recommendations' default (4), so out of the box these two sections don't look identical even with matching settings — check Desktop item width if you want them to match.

#### Customization ideas

* Place Recently Viewed below Product Recommendations on a product page: recommendations for discovery, recently viewed as a quick way back to something the shopper already looked at.

#### Settings

<details>

<summary>Settings</summary>

| Setting               | What it does                                                                    |
| --------------------- | ------------------------------------------------------------------------------- |
| Layout                | Grid or Slider                                                                  |
| Desktop item width    | **Defaults to 6** (wider items, fewer shown) — vs. 4 on Product Recommendations |
| Center text           | Defaults to off — unlike Product Recommendations                                |
| Product card settings | Same shared settings as Featured Products                                       |

</details>

***

### Best practices

* Keep Product Recommendations on the Product template only — it has no current product to work from elsewhere.
* Recently Viewed works anywhere, but it's most useful on the homepage or cart page where a returning shopper might want a quick way back to something they looked at.

## Related

* [Featured products & collections](/docs/volume-themes/sections/products/featured-products-featured-collections-and-featured-collection-grid.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://staylime.com/docs/volume-themes/sections/products/product-recommendations-and-recently-viewed-products.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
