Shopify Sidekick/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

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

  1. 1

    Copy the prompt above

  2. 2

    Open Shopify Sidekick in your Shopify admin

  3. 3

    Paste the prompt and replace the bracketed placeholders with your details

  4. 4

    Review Sidekick's response and apply the suggestions

Sidekick Skills & Magic Prompt icon

Sidekick Skills & Magic Prompt

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