Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
313cbf6
Remove some root directory files
MisterDetour Aug 24, 2026
9f32969
Add prettier config
MisterDetour Aug 24, 2026
c08156f
Remove section description comments
MisterDetour Aug 24, 2026
e920317
Start working on pdp main
MisterDetour Aug 24, 2026
3d749b3
Working on pdp
MisterDetour Aug 26, 2026
8a6b296
Stub out cart drawer
MisterDetour Aug 26, 2026
326399d
Basic cart drawer functionality
MisterDetour Aug 26, 2026
55a4a07
Review all files
MisterDetour Aug 27, 2026
91ca2c7
Add cart drawer toggle to turn on
MisterDetour Aug 27, 2026
6c099ea
Refresh cart on ajax atc
MisterDetour Aug 27, 2026
7e42c53
Update todos
MisterDetour Aug 27, 2026
8a9a701
Update cart counts on atc
MisterDetour Aug 27, 2026
bd56578
Toggle cart drawer on icon click
MisterDetour Aug 27, 2026
0ac5ce6
Toggle cart drawer on icon click
MisterDetour Aug 27, 2026
e093bfb
Working on cart drawer
MisterDetour Sep 14, 2026
ba56a62
Drawer quantity and delete functionality
MisterDetour Sep 14, 2026
89652c7
Add global styles
MisterDetour Sep 15, 2026
a4c4f8d
Cleanup todos
MisterDetour Sep 16, 2026
36cc332
Mobile menu
MisterDetour Sep 16, 2026
15d2389
MVP
MisterDetour Sep 16, 2026
66dce91
Fix cart count bubble
MisterDetour Sep 16, 2026
714d771
Move cart drawer to snippet
MisterDetour Sep 16, 2026
b32e2c7
Add Main elements to each template
MisterDetour Sep 17, 2026
a8c9c4a
Mobile menu accessability
MisterDetour Sep 17, 2026
1ee2ce6
Skip to content link
MisterDetour Sep 17, 2026
5f5af7f
Search results
MisterDetour Sep 17, 2026
70aa23d
Fix menu flash
MisterDetour Sep 17, 2026
f0de9df
Multiple variant images Skill setup
MisterDetour Sep 17, 2026
ece062d
Multiple variant images Skill setup
MisterDetour Sep 17, 2026
1543d8c
Cart page styles and functionality
MisterDetour Sep 17, 2026
ad3be9d
Cart discounts
MisterDetour Sep 18, 2026
24011ec
Cart drawer discounts
MisterDetour Sep 18, 2026
5ab4eda
Cart drawer discounts
MisterDetour Sep 18, 2026
c14cc68
Working on password page:
MisterDetour Sep 23, 2026
df205c1
Working on pdp
MisterDetour Sep 24, 2026
6c3e00e
Working on pdp
MisterDetour Sep 24, 2026
c3d30bb
Working on pdp
MisterDetour Sep 25, 2026
17cba5f
Cleanup variant change js
MisterDetour Sep 25, 2026
4e26edf
Add class to oos options
MisterDetour Sep 25, 2026
5e676ba
Show active variant images
MisterDetour Sep 25, 2026
fb20f6c
Password page subscribe form test
MisterDetour Sep 25, 2026
75dc3b0
Collection pagination
MisterDetour Sep 25, 2026
e56a160
Scaffold collection filtering
MisterDetour Sep 25, 2026
67a537b
Update collection on filter change event
MisterDetour Sep 25, 2026
fc4d34d
Working on filters
MisterDetour Sep 28, 2026
1d811ea
Add Sort By dropdown
MisterDetour Sep 28, 2026
19b3f6e
Working on filters
MisterDetour Sep 28, 2026
2e3c8a2
Working on filters
MisterDetour Sep 28, 2026
033a885
Working on filters
MisterDetour Sep 28, 2026
d78080a
Working on filters
MisterDetour Sep 28, 2026
176601a
Filters are functioning
MisterDetour Sep 28, 2026
7a64678
Image sizes attributes
MisterDetour Sep 29, 2026
bf4f474
Working on pdp preload
MisterDetour Sep 29, 2026
345a2b4
Debounce quantity changes
MisterDetour Sep 29, 2026
0b2b0b3
Allow quantity change to input
MisterDetour Sep 29, 2026
531401d
Contact page template
MisterDetour Sep 30, 2026
e2d5cc0
Skip the image snippet on most images
MisterDetour Sep 30, 2026
3f39132
Reset pdp images
MisterDetour Sep 30, 2026
808a78c
Rename main sections
MisterDetour Sep 30, 2026
bb3cc1c
Add cart drawer note
MisterDetour Sep 30, 2026
573db16
Cart drawer scrollbar styles
MisterDetour Sep 30, 2026
b502cb4
Mobile nav styles
MisterDetour Sep 30, 2026
5f35fe2
Some mobile styles
MisterDetour Sep 30, 2026
6855765
Fix cart update bug on private windows
MisterDetour Sep 30, 2026
e227475
Add strings to translation files
MisterDetour Sep 30, 2026
9589a48
Add all strings to local files
MisterDetour Sep 30, 2026
fc5610f
Empty cart drawer
MisterDetour Sep 30, 2026
5a7741f
Cleanup variant image loops
MisterDetour Oct 1, 2026
4444213
Don't update pdp url if no variant passed
MisterDetour Oct 1, 2026
42ffa45
Media support
MisterDetour Oct 1, 2026
1e091ae
Media support
MisterDetour Oct 1, 2026
602d23c
Add arrows to thumbnail swiper
MisterDetour Oct 1, 2026
7634215
Swap Close icon
MisterDetour Oct 1, 2026
90c80c1
Announcement bar
MisterDetour Oct 2, 2026
ee31b85
Update workflow version
MisterDetour Oct 2, 2026
b3d3573
Update todos
MisterDetour Oct 2, 2026
535e70f
Fix cart bug
MisterDetour Oct 2, 2026
9ab8744
Animate filter dropdowns
MisterDetour Oct 2, 2026
21f95ba
Working on price filters
MisterDetour Oct 2, 2026
04151f4
Working on price filters
MisterDetour Oct 2, 2026
802d716
Wait for cart to update to open drawer
MisterDetour Oct 6, 2026
d69def1
Add loader to add to cart button
MisterDetour Oct 6, 2026
55b4feb
Filter styles
MisterDetour Oct 6, 2026
99da88d
Set max width on mobile menu
MisterDetour Oct 6, 2026
7e0bf4f
Add starts from pricing to collections
MisterDetour Oct 6, 2026
73ccd59
Add starts from pricing to collections
MisterDetour Oct 6, 2026
223935a
Update product form class
MisterDetour Oct 6, 2026
546d302
Update todos
MisterDetour Oct 6, 2026
5e60cef
Add vissually-hidden class
MisterDetour Oct 6, 2026
5f037a6
Add focus visible styles
MisterDetour Oct 6, 2026
543f8f0
Add focus visible styles
MisterDetour Oct 6, 2026
919b5cf
Add focus visible styles
MisterDetour Oct 6, 2026
83438e5
Fix a few accessability errors
MisterDetour Oct 6, 2026
0b9f597
Add keyboard accessibility to gallery navigation slides
MisterDetour Oct 6, 2026
a7d8feb
Add a favicon setting
MisterDetour Oct 6, 2026
fa7207b
Add logo field
MisterDetour Oct 6, 2026
0107420
Fix html validation errors
MisterDetour Oct 7, 2026
479140c
Fix html validation errors
MisterDetour Oct 7, 2026
d206d96
Fix html validation errors
MisterDetour Oct 7, 2026
b47271f
Fix html validation errors
MisterDetour Oct 7, 2026
fc0ee52
Add high fetch priority to LCP images
MisterDetour Oct 7, 2026
8d769e5
Move cart drawer js into own file
MisterDetour Oct 7, 2026
4562b98
Move header js into global file
MisterDetour Oct 7, 2026
021cf07
Add comments to javascript
MisterDetour Oct 7, 2026
ae6f284
Make header & footer full width
MisterDetour Oct 7, 2026
35e8aa8
Update icons using library
MisterDetour Oct 7, 2026
0df1fc1
Lighthouse accessabity fixes
MisterDetour Oct 8, 2026
5b22a6c
Lighthouse accessabity fixes
MisterDetour Oct 8, 2026
aa844e1
Move favicon below logo
MisterDetour Oct 8, 2026
0e0b3b9
Update readme
MisterDetour Oct 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/skills/multi-variant-images/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
name: multi-variant-images
description: "Use when: implementing Shopify product galleries that switch by variant, using variant metafields with product-image fallback, and hide/show or Swiper logic in a Shopify theme."
---

# Shopify variant image gallery pattern

Use this when a product needs different gallery images for different variants while still falling back to the default product gallery when a variant has no custom images.

## Recommended metafield setup

Create a variant metafield:

- Namespace: `custom`
- Key: `variant_gallery`
- Type: `list.file_reference`

This lets each variant store multiple gallery images. If the variant has no images, fall back to the product's normal `product.images` list.

## Liquid pattern

Use the selected variant first, then fallback to product images:

```liquid
{% assign selected_variant = product.selected_or_first_available_variant %}
{% assign variant_gallery_images = selected_variant.metafields.custom.variant_gallery.value %}

{% if variant_gallery_images == blank %}
{% assign variant_gallery_images = product.images %}
{% endif %}
```

Use that list for the main gallery and the thumbnail gallery.

## DOM-first approach for JS toggling

When the product needs a fast variant switch without rebuilding the gallery from scratch, render all variant image slides up front and switch visibility with JavaScript.

Recommended pattern:

- each slide includes `data-variant-id` and a variant-local image index
- hide all non-matching variant slides
- reveal only the selected variant slides
- update the main gallery and thumbnail gallery together
- keep a safe fallback to `product.images` when no variant gallery exists

Example structure:

```liquid
<div class="product-gallery swiper">
<div class="swiper-wrapper">
{% for variant in product.variants %}
{% assign variant_images = variant.metafields.custom.variant_gallery.value %}
{% if variant_images == blank %}
{% assign variant_images = product.images %}
{% endif %}

{% for image in variant_images %}
<div
class="swiper-slide product-gallery-slide"
data-variant-id="{{ variant.id }}"
data-image-index="{{ forloop.index0 }}"
{% if variant.id != selected_variant.id %}hidden{% endif %}
>
{% render 'image-pdp', image: image %}
</div>
{% endfor %}
{% endfor %}
</div>
</div>
```

## JavaScript guidance

Keep the JS simple:

1. Select the active variant from the product form or option selectors.
2. Find the matching slides for that variant.
3. Hide all other slides.
4. Rebuild or refresh the Swiper instance if needed.
5. Jump to slide 0 for the selected variant.

Avoid:

- using a global slide index across all variants
- calculating thumbnail targets from hidden slides from other variants
- leaving stale Swiper state from a previous variant selection

## Safe fallback rules

- If no metafield value exists: use `product.images`
- If a variant has only one image: still render it in the same gallery pattern
- If variant selectors change, re-run the gallery sync and maintain the product price update

## Good implementation choices for this repo

This theme uses a minimal section + snippet pattern and Swiper for product galleries. This variant-gallery pattern fits well with that structure.

Prefer:

- template-level logic in the product section
- a simple DOM-first hide/show model for low complexity
- variant metadata kept in Shopify instead of custom app logic

## Example checklist

- [ ] Variant metafield created in Shopify
- [ ] Fallback to `product.images` is implemented
- [ ] Selected variant gallery renders in DOM
- [ ] JS hides non-selected variants
- [ ] Thumbnail click logic targets the correct slide
- [ ] Swiper is refreshed after variant change
- [ ] Product price logic still works with option selectors

## Notes

This is a theme-only solution. It does not assume a custom app or external proxy. It is best for a single store theme or storefront pattern where variant-specific gallery images are controlled in Shopify admin.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ jobs:
name: Theme Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Theme Check
uses: shopify/theme-check-action@v2
with:
token: ${{ github.token }}
token: ${{ github.token }}
22 changes: 0 additions & 22 deletions .github/workflows/cla.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 120,
"singleQuote": true,
"overrides": [
{
"files": "*.liquid",
"options": {
"singleQuote": false
}
}
]
}
22 changes: 9 additions & 13 deletions .shopifyignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# This file contains a list of files that will be excluded from Shopify CLI
# operations such as push, pull, dev, etc.
#
# Examples:
#
# Ignore a specific file:
# templates/product.json
#
# Ignore templates with a wildcard pattern:
# templates/*.json
#
# Ignore templates and sections with a regular expression:
# /(templates|sections)/.*\.json/
.gitignore
.gitattributes
.prettierrc.json
.theme-check.yml
.vscode/*
*.md
.git/*
.github/*
.shopify/*
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["shopify.theme-check-vscode", "esbenp.prettier-vscode"]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.formatOnSave": false,
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.formatOnSave": true
},
"[liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode",
"editor.formatOnSave": true
},
"themeCheck.checkOnSave": true
}
132 changes: 0 additions & 132 deletions CODE_OF_CONDUCT.md

This file was deleted.

24 changes: 0 additions & 24 deletions CONTRIBUTING.md

This file was deleted.

9 changes: 0 additions & 9 deletions LICENSE.md

This file was deleted.

Loading
Loading