[object Object]

← back to Designer Wallcoverings

brand-router: neutralize deleted hardcoded page 79444574259 — make page-push opt-in via BRAND_ROUTER_PAGE_ID, skip (not 404/clobber) when unset

310e37f19eac2a300e9200ee95f0bd06f6605ee5 · 2026-06-23 17:54:27 -0700 · Steve Abrams

Files touched

Diff

commit 310e37f19eac2a300e9200ee95f0bd06f6605ee5
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jun 23 17:54:27 2026 -0700

    brand-router: neutralize deleted hardcoded page 79444574259 — make page-push opt-in via BRAND_ROUTER_PAGE_ID, skip (not 404/clobber) when unset
---
 brand-router/create-vendor-collections.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/brand-router/create-vendor-collections.js b/brand-router/create-vendor-collections.js
index 1bd7e8e0..3b0032fa 100644
--- a/brand-router/create-vendor-collections.js
+++ b/brand-router/create-vendor-collections.js
@@ -28,7 +28,12 @@ const SHOPIFY_API_VER = '2024-10';
 const BRAND_ROUTER_PORT = 9895;
 const BRAND_ROUTER_PASSWORD = process.env.BRAND_ROUTER_PASSWORD;
 const BRANDS_FILE = path.join(__dirname, 'brands-data.json');
-const SHOPIFY_PAGE_ID = 79444574259;
+// NOTE: the old hardcoded page 79444574259 was DELETED from Shopify (PUT → 404).
+// The live brands directory is /pages/designer-brands (id 20309475440), but it uses
+// a DIFFERENT text-list format — pushing this script's dw-brands-grid logo-wall onto it
+// would CLOBBER it. So the page-push is now opt-in: set BRAND_ROUTER_PAGE_ID only when
+// a page that is meant to hold the logo-wall HTML actually exists.
+const SHOPIFY_PAGE_ID = process.env.BRAND_ROUTER_PAGE_ID || null;
 
 if (!SHOPIFY_TOKEN) {
   throw new Error('BRAND_ROUTER_SHOPIFY_TOKEN environment variable is required');
@@ -499,6 +504,12 @@ async function main() {
 
   // Step 7: Push HTML to Shopify page
   console.log('\n[6/6] Pushing regenerated HTML to Shopify page...');
+  if (!SHOPIFY_PAGE_ID) {
+    console.log('   SKIP: no BRAND_ROUTER_PAGE_ID set — not pushing the logo-wall HTML to any live page');
+    console.log('   (old hardcoded page 79444574259 was deleted; set BRAND_ROUTER_PAGE_ID to a real logo-wall page to re-enable).');
+    console.log('\n=== Done ===');
+    return;
+  }
   try {
     const htmlPath = path.join(__dirname, '..', 'vendor-logos', '_brands-page.html');
     if (!fs.existsSync(htmlPath)) {

← 72905e93 auto-save: 2026-06-23T17:53:42 (20 files) — shopify/_cwGRID/  ·  back to Designer Wallcoverings  ·  snapshot incidental tree state before gemini-key history scr aaa4f371 →