SwatchBoost Documentation
SwatchBoost is a Shopify Theme App Extension that intercepts the Add to Cart action on product pages, shows a multi-colour picker popup, and automatically applies tiered bulk discounts — all with zero code and full RTL support.
Overview
- Works as a Shopify Theme App Extension — no theme code injection required
- Variant data is server-rendered via Liquid — zero page speed impact
- All intercepts (fetch, XHR, form submit) are set up client-side before the page is interactive
- Config (branding, tiers, copy) is fetched from the app server at runtime and cached for 60 seconds
- Fully compatible with Online Store 2.0 themes
Installation
Installing SwatchBoost takes under 5 minutes and requires no developer access.
Install from the Shopify App Store
Visit the SwatchBoost listing and click Add app. Approve the permissions.
Enable the App Embed
In your Shopify admin go to Online Store → Themes → Customize → App embeds. Find SwatchBoost Popup and toggle it on. Click Save.
Activate your first product
In the SwatchBoost app, go to Products and click Activate next to any product that has a Colour option.
Test on your storefront
Open a product page and click Add to Cart. The SwatchBoost popup should appear.
Quick Start Checklist
- App installed and permissions approved
- App Embed toggled on in theme editor and saved
- At least one product activated in the Products tab
- Product has a
ColororColouroption with 2+ variants - Test on storefront: popup appears when clicking Add to Cart
The Popup Flow
SwatchBoost intercepts the Add to Cart action using three strategies in order of reliability:
- 1.fetch override — replaces
window.fetchglobally. When the theme posts to/cart/add.js, the override opens the popup and returns a fake 200 response so the theme UI does not break. - 2.Form submit listener — captures
submitevents on forms withaction="/cart/add"ordata-type="add-to-cart-form"at the document level (capture phase). - 3.Click listener — document-level capture listener that walks up the DOM from the clicked element looking for an Add to Cart button by name, class, or form context.
Colour Detection
SwatchBoost detects your colour option automatically via Liquid on the server, so there is no client-side guessing. The liquid template reads product.options and finds the first option whose name matches:
color, colour, اللون, couleur, farbe
If no match is found, the first option is used. The variant data (IDs, prices, availability) is injected directly into the page as window.__SB_VARIANTS__ — a JSON array available immediately when the script runs, before any fetch calls.
Live Cart Sync
When a customer taps a colour swatch in the popup:
- Selecting a colour makes a
POST /cart/add.jsrequest immediately. The swatch shows a spinner while the request is in flight. - Deselecting a colour calls
POST /cart/change.jswith quantity 0, removing just that variant from the cart. - The cart is updated in real time — no page reload needed.
- The View Cart button updates to show the live colour count.
Brand Themes
SwatchBoost ships with three ready-made brand presets. Select one in the Customizer tab of the app.
Premium Boutique
White, gold, serif — luxury fashion and accessories
Bold & Energetic
Dark background, green — streetwear, sports, tech
Warm & Regional
Cream, terracotta — Middle East, regional boutiques, RTL stores
Custom Copy
On Starter and Growth plans you can customise every text string shown in the popup:
- Headline — main title inside the popup (e.g. "Style it in more than one.")
- Subheadline — short supporting line (e.g. "Select colours — each adds to cart instantly.")
- CTA text — the checkout button label
- Max tier text — shown when the highest discount tier is reached
Discount Tiers
Default tiers are set globally in the Customizer. On Starter and Growth plans you can customise the minimum quantity and discount percentage for each tier.
2 colours → 5% off 3 colours → 10% off 4+ colours → 15% off
Accent Colour
You can override the accent colour (used for progress bar, pill, swatch selection ring, and CTA) with any hex value. This is available on Starter and Growth plans.
RTL & Arabic Support
SwatchBoost is the only colour-swatch upsell app verified to work natively in RTL languages. No other top-tier Shopify swatch app supports this.
How RTL Works
SwatchBoost detects the store language direction from the dir attribute on the <html> element. When dir="rtl" is set:
- The popup panel mirrors horizontally — close button moves to the left, content reads right-to-left
- The progress bar fills from right to left
- Swatch check badges reposition to the correct corner
- The Warm & Regional brand preset uses Cairo font which renders Arabic text correctly
Arabic Setup
If your Shopify store serves Arabic (or any RTL language), follow these steps:
Supported Languages
The popup UI works in any language your store serves. The following RTL languages are explicitly tested:
Activating Products
SwatchBoost only activates on products you explicitly enable. This prevents the popup from appearing on products with non-colour variants (size, material, etc.).
- Go to SwatchBoost app → Products tab
- Your store's products are listed. Products with a
Color/Colouroption are highlighted - Click Activate on any product to enable the popup
- Click Deactivate to disable it for that product
Colour Option Names
SwatchBoost automatically detects the colour option if it is named one of the following (case-insensitive):
color, colour, اللون, couleur, farbe
If your store uses a different name (e.g. "Shade", "Hue", "Finish"), contact support and we will add it to your account's detection list.
Products with 1 Colour Variant
Automatic Discount Setup
SwatchBoost shows the savings to customers in the popup, but the actual discount must be created in Shopify Admin as an Automatic Discount. This is a one-time setup.
Go to Shopify Admin → Discounts → Create discount → Automatic discount
Select "Amount off products" or "Buy X get Y" depending on your store setup.
Configure a tier — example: 2 colours = 5% off
Set "Minimum quantity of items" to 2, discount value to 5%, and target to "Specific products" (select the same products you activated in SwatchBoost).
Repeat for each tier
Create three automatic discounts — one for 2+, one for 3+, one for 4+ items. Shopify will apply the best applicable discount automatically.
Test in your storefront
Add 2+ colours via SwatchBoost, go to checkout, and verify the discount appears in the order summary.
Plan Comparison
| Feature | Free | Starter | Growth |
|---|---|---|---|
| Price | $0 | $9.99/mo | $24.99/mo |
| Free trial | — | 7 days | 7 days |
| Products | 1 | Up to 10 | Unlimited |
| Default discount tiers | ✓ | ✓ | ✓ |
| Custom discount tiers | — | ✓ | ✓ |
| RTL support | ✓ | ✓ | ✓ |
| Custom accent colour | — | ✓ | ✓ |
| Custom popup copy | — | ✓ | ✓ |
| Brand presets | — | 2 | All 3 |
| Full custom branding | — | — | ✓ |
| Analytics dashboard | — | — | ✓ |
| Priority support | — | — | ✓ |
Free Trial
All paid plans (Starter and Growth) include a 7-day free trial on first install. You will not be charged until the trial ends. Cancel at any time from Shopify Admin → Apps → SwatchBoost → Cancel subscription.
Developer & Partner Stores
If you are installing SwatchBoost on a Shopify Partner development store, all Growth plan features are unlocked automatically at no charge. This allows full testing before presenting to clients.
Troubleshooting
Popup not showing when clicking Add to Cart
- Confirm the App Embed is toggled on in your theme editor and the theme has been saved
- Confirm the product is activated in the Products tab
- Confirm the product has a
ColororColouroption with at least 2 available variants - Hard-refresh the product page (
Cmd+Shift+R/Ctrl+Shift+R) to clear CDN cache - Check the browser console for any JavaScript errors prefixed with
[SwatchBoost]
Discount not applied at checkout
- Verify you have created Automatic Discounts in Shopify Admin → Discounts (see Discounts section)
- Ensure the automatic discount targets the same products activated in SwatchBoost
- Check the discount is active and not expired
- Test in a fresh browser session (not logged in as admin) — some admin-only discounts do not apply in preview mode
RTL layout issues
- Ensure your theme sets
dir="rtl"on the<html>element when the RTL language is active - Use the Warm & Regional brand preset for best Arabic typography
- If colour option names are in Arabic, contact support to add custom option name detection