← back to New Import Viewer
TK-10039: phase8-fix/shopify-push.js migrates width to metafield + prose-only body
fae9d9418e1d022cde536954597b0add3b7d6889 · 2026-07-29 07:47:53 -0700 · Steve Abrams
Files touched
M phase8-fix/shopify-push.js
Diff
commit fae9d9418e1d022cde536954597b0add3b7d6889
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 29 07:47:53 2026 -0700
TK-10039: phase8-fix/shopify-push.js migrates width to metafield + prose-only body
---
phase8-fix/shopify-push.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/phase8-fix/shopify-push.js b/phase8-fix/shopify-push.js
index 5ece0a8..078f700 100644
--- a/phase8-fix/shopify-push.js
+++ b/phase8-fix/shopify-push.js
@@ -149,8 +149,8 @@ async function pushVendor(vendorCode, { pool, token, store, limit = 400, allowAc
const images = parseImages(r.image_url, r.all_images);
if (!images.length) { skipped++; continue; }
const price = parsePrice(r.specs);
- const body = (r.ai_description ? `<p>${r.ai_description}</p>` : '') +
- (r.width ? `<ul><li><strong>Width:</strong> ${r.width}</li></ul>` : '');
+ // specs live in metafields (rendered by product-description-meta.liquid), NEVER a body list (TK-10039)
+ const body = r.ai_description ? `<p>${r.ai_description}</p>` : '';
const payload = {
title: `${r.pattern_name}${r.color_name ? ' - ' + r.color_name : ''} | ${displayVendor}`,
@@ -165,7 +165,11 @@ async function pushVendor(vendorCode, { pool, token, store, limit = 400, allowAc
],
options: [{ name: 'Title' }],
images: images.map(src => ({ src })),
- metafields: [{ namespace: 'custom', key: 'mfr_sku', value: String(r.mfr_sku || ''), type: 'single_line_text_field' }],
+ metafields: [
+ { namespace: 'custom', key: 'mfr_sku', value: String(r.mfr_sku || ''), type: 'single_line_text_field' },
+ // width migrated from the old body <ul> → the metafields the theme renders (TK-10039)
+ ...(r.width ? [{ namespace: 'custom', key: 'width', value: String(r.width), type: 'single_line_text_field' }, { namespace: 'global', key: 'width', value: String(r.width), type: 'single_line_text_field' }] : []),
+ ],
};
if (/command\s*-?\s*54/i.test(JSON.stringify(payload))) { skipped++; continue; }
← fed1f23 TK-10039: consumer.js (new-import-viewer cadence) migrates s
·
back to New Import Viewer
·
new-import-viewer: adopt href-to-deeper-data primitives (TK- c4b93a3 →