Shopify Sidekick/Theme/Recently Viewed Products Row
Task IntentTheme

Recently Viewed Products Row

Display a row of recently viewed products using browser local storage for personalization.

What This Sidekick Query Does

Display a row of recently viewed products using browser local storage for personalization.

Prompt / Skill

Create a recently viewed products section that tracks which products a customer has viewed using browser localStorage and displays them in a horizontal scrollable row. Show up to [MAX_PRODUCTS] products (e.g., 8). Each product card should display: product image, title, price, and a Quick Add button. The section should only appear if the customer has viewed at least [MIN_PRODUCTS] products (e.g., 2). On each product page load, save the product handle, title, image URL, price, and URL to localStorage. Use the section heading [SECTION_HEADING] (e.g., Recently Viewed). The row should scroll horizontally with arrow buttons on desktop and swipe on mobile. Include a Clear History link. Do not use cookies – localStorage only. Generate the Liquid section, JavaScript, and CSS.

Expected Output

Display a row of recently viewed products using browser local storage for personalization.

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.