← back to Designer Wallcoverings
cadence-import: gated double-roll MOQ for York/Brewster roll SKUs (inert until DW_DOUBLE_ROLL_MOQ=1)
c56edd4d8f4674c19f418320eba20abae5dcc835 · 2026-06-25 16:00:04 -0700 · Steve
Files touched
M shopify/scripts/cadence/cadence-import.js
Diff
commit c56edd4d8f4674c19f418320eba20abae5dcc835
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Jun 25 16:00:04 2026 -0700
cadence-import: gated double-roll MOQ for York/Brewster roll SKUs (inert until DW_DOUBLE_ROLL_MOQ=1)
---
shopify/scripts/cadence/cadence-import.js | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 9ab97e18..75550b62 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -60,6 +60,19 @@ const SAMPLEONLY_DRIP = flag('--sampleonly') || process.env.QUADRILLE_SAMPLEONLY
// Flip ON only AFTER Steve approves + the gated house_line backfill SQL has run. (Mirrors the
// QUADRILLE_SAMPLEONLY_DRIP / --collections default-OFF gating precedent in this file.)
const DWBR_HOUSE_LINE = flag('--house-line') || process.env.DWBR_HOUSE_LINE_REMAP === '1';
+// Double-roll MOQ enforcement (Steve 2026-06-25: "York/Brewster lines are always sold in double
+// rolls. Other than a few murals. 1 single roll will never be an option."). OFF by default — when
+// OFF, the new code path below short-circuits and NO qty metafield is emitted, so committing this
+// is INERT and the live cadence behaves exactly as before (mirrors the QUADRILLE_SAMPLEONLY_DRIP /
+// DWBR_HOUSE_LINE default-OFF gating precedent). When ON (env DW_DOUBLE_ROLL_MOQ=1 or
+// --double-roll-moq), any NEW roll product whose EMITTED vendor is a York/Brewster house line gets
+// global.v_prods_quantity_order_min/units=2 so the theme can never offer a single roll. EXEMPT:
+// non-roll goods (soldBy not a roll — fabric/yard/panel), murals, and peel&stick/removable. The
+// retroactive backfill of existing drift is a SEPARATE Steve-gated step (see pending-approval memo).
+const DW_DOUBLE_ROLL_MOQ = flag('--double-roll-moq') || process.env.DW_DOUBLE_ROLL_MOQ === '1';
+// Emitted-vendor house lines that are York/Brewster (sold double-roll). DWBR resolves to one of the
+// two house lines via emitVendorFor(); Jeffrey Stevens + Malibu Wallpaper pass through directly.
+const YORK_BREWSTER_ROLL_VENDORS = new Set(['Jeffrey Stevens', 'Malibu Wallpaper', 'LA Walls']);
const TODAY = new Date().toISOString().slice(0, 10);
// Defensive vendor denylist — even if a vendor is in vendors.js + discount_confirmed, NEVER
// import these (belt-and-suspenders for sub-brand/registry drift). Today vendors.js already
@@ -569,6 +582,16 @@ function buildInput(vendor, cfg, row, retail, activate) {
m('custom','cost',row.cost.toFixed(2),ND); // REAL cost
m('custom','price_updated_at',TODAY,'date'); // 30-day refresh audit
m('global','unit_of_measure',`Priced Per ${soldBy}`,SL);
+ // ---- Double-roll MOQ for York/Brewster roll lines (gated, inert until DW_DOUBLE_ROLL_MOQ) ----
+ // theme DesignerWallcoverings-product.liquid defaults prods_quantity_order_min=1; any roll product
+ // MISSING global.v_prods_quantity_order_min falls back to single-roll-orderable. Stamp 2/2 so the
+ // theme forces double-roll. ROLL-only (soldBy contains 'roll'); murals + peel&stick are exempt.
+ if (DW_DOUBLE_ROLL_MOQ && YORK_BREWSTER_ROLL_VENDORS.has(vendor) && /roll/i.test(soldBy)
+ && !/\bmurals?\b/i.test(title) && !/\bmurals?\b/i.test(productType)
+ && !/peel\s*(?:and|&|-)?\s*stick|removable/i.test(title)) {
+ m('global','v_prods_quantity_order_min','2',SL);
+ m('global','v_prods_quantity_order_units','2',SL);
+ }
// Auto-activate-to-live readiness gate (Steve 2026-06-17 "auto-activate to live";
// description gate 2026-06-19; SPECS+DESC+ALL-VENDOR-IMAGES gate 2026-06-20):
// a product goes ACTIVE only when validateBeforeActivate() passes — real image
← f7aa3d46 v5.6.0 staged: PDP info-column light tidy (equal-width align
·
back to Designer Wallcoverings
·
auto-save: 2026-06-25T16:05:06 (8 files) — DW-Agents/vendor- b360daed →