[object Object]

← back to Designer Wallcoverings

Quadrille-house cadence: type-by-row from staging table (most are Fabric, not Wallcovering)

7ba76ce793af25ff864236faa1eaf59273c1c2e4 · 2026-06-29 16:43:40 -0700 · Steve

Root cause of the Suncloth mislabel applies to ALL 8 quadrille-house brands: vendors.js
hardcoded productType, overriding the quadrille_house_catalog staging table's ground-truth
product_type column. Staging truth: Quadrille/Alan Campbell/Home Couture/Charles Burger/
Cloth and Paper/Plains/Suncloth = Fabric; Grasscloth = Wallcovering. Set typeByRow:true +
shared QH_TYPE map on all 8 so the cadence honors the row's type (uses the existing
resolveType() path, same as Anna French). Future mixed-type rows handled automatically.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 7ba76ce793af25ff864236faa1eaf59273c1c2e4
Author: Steve <steve@designerwallcoverings.com>
Date:   Mon Jun 29 16:43:40 2026 -0700

    Quadrille-house cadence: type-by-row from staging table (most are Fabric, not Wallcovering)
    
    Root cause of the Suncloth mislabel applies to ALL 8 quadrille-house brands: vendors.js
    hardcoded productType, overriding the quadrille_house_catalog staging table's ground-truth
    product_type column. Staging truth: Quadrille/Alan Campbell/Home Couture/Charles Burger/
    Cloth and Paper/Plains/Suncloth = Fabric; Grasscloth = Wallcovering. Set typeByRow:true +
    shared QH_TYPE map on all 8 so the cadence honors the row's type (uses the existing
    resolveType() path, same as Anna French). Future mixed-type rows handled automatically.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 shopify/scripts/cadence/vendors.js | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/shopify/scripts/cadence/vendors.js b/shopify/scripts/cadence/vendors.js
index 70810daf..a29bc930 100644
--- a/shopify/scripts/cadence/vendors.js
+++ b/shopify/scripts/cadence/vendors.js
@@ -10,6 +10,18 @@
 // To add a vendor: verify its cost column by inspection, confirm its discount in
 // vendor_registry, add an entry here. NEVER guess a cost column (money).
 
+// Quadrille-house per-row type map (Steve 2026-06-29): the quadrille_house_catalog staging
+// table carries the GROUND-TRUTH product_type per row (Fabric for ~95%, Wallcovering for the
+// Grasscloth line). All 8 house brands use typeByRow:true + this map so the cadence honors the
+// row's type instead of a hardcoded constant — Suncloth/Quadrille/etc. are FABRIC, Grasscloth
+// stays Wallcovering, and any future mixed-type rows are handled automatically. soldBy stays
+// 'Sample' (these are sample-only, no roll). resolveType() falls back to cfg.productType if a
+// row's product_type is blank/unmapped.
+const QH_TYPE = {
+  Fabric:       { productType: 'Fabric',       soldBy: 'Sample' },
+  Wallcovering: { productType: 'Wallcovering', soldBy: 'Sample' },
+};
+
 module.exports = {
   // direct cost column
   // 2026-06-11: total_price_per_roll was corrupt for 57 rows (computed off the bogus
@@ -134,14 +146,14 @@ module.exports = {
   // dedup: net-new selected as shopify_product_id IS NULL; the create-time dedup guard
   //                           (findExistingProduct, base-sku match) skips any SKU already live.
   // soldBy 'Sample' is cosmetic for sample-only (no roll), kept for spec/tag text consistency.
-  'Quadrille':       { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Quadrille',       soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
-  'Alan Campbell':   { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Alan Campbell',   soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
-  'Home Couture':    { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Home Couture',    soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
-  'Charles Burger':  { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Charles Burger',  soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
-  'Cloth and Paper': { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Cloth and Paper', soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
-  'Suncloth':        { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Suncloth',        soldBy: 'Sample', productType: 'Fabric', note: 'Suncloth is FABRIC, not wallcovering (Steve 2026-06-29). The staging table already classifies it Fabric; this stops the cadence overriding it to Wallcovering.' },
-  'Plains':          { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Plains',          soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
-  'Grasscloth':      { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Grasscloth',      soldBy: 'Sample', productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Quadrille':       { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Quadrille',       soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Alan Campbell':   { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Alan Campbell',   soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Home Couture':    { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Home Couture',    soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Charles Burger':  { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Charles Burger',  soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Cloth and Paper': { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Cloth and Paper', soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Suncloth':        { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Suncloth',        soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Fabric', note: 'Suncloth is FABRIC, not wallcovering (Steve 2026-06-29). The staging table already classifies it Fabric; this stops the cadence overriding it to Wallcovering.' },
+  'Plains':          { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Plains',          soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
+  'Grasscloth':      { table: 'quadrille_house_catalog', sampleOnly: true, brandFilter: 'Grasscloth',      soldBy: 'Sample', typeByRow: true, typeMap: QH_TYPE, productType: 'Wallcovering', note: 'Quadrille-house sample-only (no cost); public-site source' },
 
   // ---- DRAFTED, INERT (Steve 2026-06-24, "do the reversible prep") ----
   // Fentucci grasscloth/cork from the "TWIL PRices" Google Sheet (118 net-new rows loaded into

← 61aa048a Suncloth title cleanup: drop 'Wallcoverings' from 119 fabric  ·  back to Designer Wallcoverings  ·  auto-save: 2026-06-29T16:54:45 (8 files) — pending-approval/ 9773acef →