Hub/Theme/Generate Recently Viewed Products
Task IntentTheme

Generate Recently Viewed Products

Build a recently viewed products section using localStorage to track and display products the customer has browsed.

What This Sidekick Query Does

Build a recently viewed products section using localStorage to track and display products the customer has browsed.

Prompt / Skill

Copy, adapt, and run this prompt or skill workflow directly in Shopify Sidekick.

Create a “Recently Viewed Products” section for my Shopify theme:

Features:

  Track viewed products using localStorage
  Display as a horizontal scrollable carousel
  Show product image, title, price, and compare-at price
  Quick add-to-cart button on hover
  Maximum of 10 recently viewed products stored


Settings:

  Section heading text
  Number of products to display (4-8)
  Show/hide prices toggle
  Show/hide add-to-cart button toggle
  Background color
  Card style (bordered, shadow, minimal)


Requirements:

  Works without any app — pure JavaScript + localStorage
  Responsive grid on mobile (2 columns)
  Exclude current product from the list
  Handle product unavailability gracefully
  Generate as a Shopify theme section

Expected Output

Build a recently viewed products section using localStorage to track and display products the customer has browsed.

Tips to Improve Results

Copy the prompt above
Open Shopify Sidekick in your Shopify admin
Paste the prompt and replace the bracketed placeholders with your details
Review Sidekick's response and apply the suggestions
Sidekick Skills & Magic Prompt icon

Sidekick Skills & Magic Prompt

Create & Manage AI skills for Sidekick. Discover AI skills from other merchants.

Build unlimited custom Sidekick skills, organize prompts into collections, and discover proven workflows shared by other Shopify merchants.