← back to Dw Photo Capture
color-index: exclude sample-only ($4.25) products — require has_product_variant so shop-by-color never links to a sample-only PDP (harm-reduction until vendor costs are sourced)
5d305fe392f311b4d59afc2c004224bccbc37e0f · 2026-07-15 16:49:33 -0700 · Steve Abrams
Files touched
M scripts/build-color-index.cjs
Diff
commit 5d305fe392f311b4d59afc2c004224bccbc37e0f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 15 16:49:33 2026 -0700
color-index: exclude sample-only ($4.25) products — require has_product_variant so shop-by-color never links to a sample-only PDP (harm-reduction until vendor costs are sourced)
---
scripts/build-color-index.cjs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/build-color-index.cjs b/scripts/build-color-index.cjs
index 76b4bcd..9a5bd9d 100644
--- a/scripts/build-color-index.cjs
+++ b/scripts/build-color-index.cjs
@@ -56,6 +56,13 @@ const OUT = path.join(__dirname, '..', 'data', 'color-index.json');
-- active-but-unpublished product 404s on the storefront, so its /products/
-- <handle> link would be dead. online_store_published = live-visible.
AND sp.online_store_published = true
+ -- Harm-reduction: only surface products with a REAL roll variant to buy.
+ -- ~23k products are sample-only (whole-vendor gaps — Koroseal, Phillipe
+ -- Romano, Phillip Jeffries …) with no roll variant, so their PDP shows the
+ -- $4.25 memo Sample as the "Full Roll" price. Shop-by-color must not lead a
+ -- shopper to a $4.25 sample-only page. (Real fix = source vendor costs +
+ -- add roll variants; until then, exclude them here.)
+ AND sp.has_product_variant IS TRUE
AND pc.lab_l IS NOT NULL AND pc.lab_a IS NOT NULL AND pc.lab_b IS NOT NULL
AND pc.handle IS NOT NULL AND pc.handle <> ''
AND COALESCE(NULLIF(sp.image_url, ''), pc.image_url) IS NOT NULL
← 4214868 add nightly color-index refresh script + launchd plist (DRAF
·
back to Dw Photo Capture
·
add /apps/color-widen route: tunable ΔE band (default 15%) f e2c9e01 →