Skip to content

Recently viewed

A grid of the products this visitor has viewed before, most recent first, excluding the one they are looking at now. It ships on the product template, below the recommendations.

It earns its place on a drop store because the decision is usually between two pieces, not whether to buy at all — and a shopper who has been back and forth between a jacket and a vest wants both on screen.

SettingTypeDefaultWhat it does
HeadingTextRecently viewedSection heading.
ColumnsRange, 2–6, step 14Columns in the grid.
Max productsRange, 2–12, step 14How many products to show.
Show a clear linkCheckboxtrueShow a Clear link in the header row.
Clear labelTextClearThe clear link’s text.
Top spacingRange, 0–160 px48Top spacing.
Bottom spacingRange, 0–160 px48Bottom spacing.

No blocks. One preset, Recently viewed.

Nothing about a visitor’s browsing leaves their browser.

  1. On a product page, the product’s ID is pushed to the front of a list held in that browser’s local storage. The list holds up to 20 IDs.
  2. Wherever this section appears, it reads that list, drops the product currently being viewed, takes the first limit IDs, and asks the storefront for real product cards matching them — using the store’s own search endpoint with an id: query, which is the one way to render genuine Shopify product cards from an arbitrary list.
  3. Those cards replace the section’s contents, and only then does the section become visible.

Consequences worth knowing:

  • The section is hidden until it has something to show. A first-time visitor sees nothing — no empty band, no heading.
  • The list is per browser, per device. Signing in does not carry it across; a shopper who browses on a phone and buys on a laptop starts fresh on the laptop.
  • Clear really clears. The link empties the stored list and hides the section immediately.
  • Nothing is recorded server-side, so there is no personal data to disclose and nothing to sync.
  • If local storage is unavailable — a locked-down private window, for instance — the section stays hidden and nothing breaks.

The cards are the theme’s standard product cards, so they inherit your Theme settings → Product cards choices: vendor line, colour swatches and hover image swap. Wishlist hearts are repainted on the fetched cards, and the reveal animation is applied to them, so they behave like the rest of the page.