← back to Designer Wallcoverings
cadence: sample-only importer titles/describes Fabric lines as Fabric, not Wallcoverings
78f9bfbef5566443512fdbc8e7935bd5849ac14f · 2026-07-09 08:47:59 -0700 · Steve
Root cause of the recurring Alan Campbell wallcovering->fabric re-sweep (4th in 8 days):
buildSampleOnlyInput() hardcoded 'Wallcoverings' in the title (L465) and 'designer
wallcovering' in the desc fallback (L483), ignoring cfg.productType. Now type-aware
(mirrors the roll path) + scrubs wallcovering->fabric prose out of AI/vendor_desc for
Fabric lines. Fixes all Quadrille-house sample-only fabric lines at birth.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M shopify/scripts/cadence/cadence-import.js
Diff
commit 78f9bfbef5566443512fdbc8e7935bd5849ac14f
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Jul 9 08:47:59 2026 -0700
cadence: sample-only importer titles/describes Fabric lines as Fabric, not Wallcoverings
Root cause of the recurring Alan Campbell wallcovering->fabric re-sweep (4th in 8 days):
buildSampleOnlyInput() hardcoded 'Wallcoverings' in the title (L465) and 'designer
wallcovering' in the desc fallback (L483), ignoring cfg.productType. Now type-aware
(mirrors the roll path) + scrubs wallcovering->fabric prose out of AI/vendor_desc for
Fabric lines. Fixes all Quadrille-house sample-only fabric lines at birth.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
shopify/scripts/cadence/cadence-import.js | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 6fdb2193..3a62f00d 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -462,7 +462,13 @@ function buildSampleOnlyInput(vendor, cfg, row, activate) {
// Title core: "Pattern, Color" → "Color" (when no pattern) → pattern → dw_sku. NEVER mfr_sku, NEVER Unknown.
let core = (pattern && color) ? `${pattern}, ${color}` : (pattern || color);
if (!core) core = row.dw_sku;
- const title = `${core} Wallcoverings | ${vendor}`.replace(/wallpaper/gi,'Wallcovering');
+ // type-aware title word: Quadrille-house lines are mostly FABRIC (Alan Campbell, Quadrille,
+ // Home Couture, Plains…) — only Grasscloth is genuinely wallcovering. Respect cfg.productType
+ // so a Fabric line is never titled "Wallcoverings" (mirrors the roll path @ ~L612). Fixing this
+ // at birth stops the recurring Alan-Campbell wallcovering→fabric re-sweep (4th cleanup, 2026-07-09).
+ const isFabric = /fabric/i.test(cfg.productType || '');
+ const typeWord = isFabric ? 'Fabric' : 'Wallcoverings';
+ const title = `${core} ${typeWord} | ${vendor}`.replace(/wallpaper/gi,'Wallcovering');
const handle = (`${core}-${row.dw_sku}`).toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-+|-+$/g,'').slice(0,100);
// Description: prefer the real AI/vendor description (already enriched); fall back to a clean
@@ -478,9 +484,14 @@ function buildSampleOnlyInput(vendor, cfg, row, activate) {
if (row.collection) specs.push(`<li><strong>Collection:</strong> ${esc(row.collection)}</li>`);
const safeVendor = scrubBanned(vendor);
const safeCollection = scrubBanned(row.collection);
- const intro = vendorDesc
+ let intro = vendorDesc
? esc(vendorDesc).replace(/wallpaper/gi,'Wallcovering')
- : `${pattern||core}${color?' in '+color:''} is a designer wallcovering${safeCollection?' from the '+esc(safeCollection)+' collection':''} by ${safeVendor}.`;
+ : `${pattern||core}${color?' in '+color:''} is a designer ${isFabric?'fabric':'wallcovering'}${safeCollection?' from the '+esc(safeCollection)+' collection':''} by ${safeVendor}.`;
+ // for a FABRIC line, scrub any residual "wallcovering(s)" prose (case-preserving) out of the
+ // AI/vendor description too — the enriched vendor_desc is often written as "This wallcovering…".
+ if (isFabric) intro = intro
+ .replace(/Wallcoverings/g,'Fabrics').replace(/wallcoverings/g,'fabrics')
+ .replace(/Wallcovering/g,'Fabric').replace(/wallcovering/g,'fabric');
const descriptionHtml = `<p>${intro}</p>${specs.length?`<ul>${specs.join('')}</ul>`:''}`;
// Metafields — NO cost (there is none). Width/specs where present, brand, sku, pattern, color.
← 0d7f32d8 Alan Campbell: re-sweep 103 new-arrival products wallcoverin
·
back to Designer Wallcoverings
·
auto-save: 2026-07-09T09:09:49 (3 files) — pending-approval/ c7633ec4 →