← back to New Import Viewer
TK-10039: consumer.js (new-import-viewer cadence) migrates specs to metafields + prose-only body
fed1f2359ed2d404903dca8ce119f24fc31b4f7c · 2026-07-29 07:35:20 -0700 · Steve Abrams
Files touched
Diff
commit fed1f2359ed2d404903dca8ce119f24fc31b4f7c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 29 07:35:20 2026 -0700
TK-10039: consumer.js (new-import-viewer cadence) migrates specs to metafields + prose-only body
---
consumer.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/consumer.js b/consumer.js
index 3046217..2c55766 100644
--- a/consumer.js
+++ b/consumer.js
@@ -278,8 +278,9 @@ async function shopifyPublishOnlineStore(productId) {
const specRows = [['Width', width], ['Repeat', repeat], ['Match', match], ['Fire Rating', fire],
['Composition', composition], ['Sold By', sellUnit]]
.filter(([, v]) => v && String(v).trim());
- const body = (aiDesc ? `<p>${aiDesc}</p>` : '') +
- (specRows.length ? '<ul>' + specRows.map(([k, v]) => `<li><strong>${k}:</strong> ${v}</li>`).join('') + '</ul>' : '');
+ // specs live in metafields (rendered by product-description-meta.liquid), NEVER a body list (TK-10039)
+ void specRows;
+ const body = aiDesc ? `<p>${aiDesc}</p>` : '';
const payload = {
title: `${pattern}${color ? ' - ' + color : ''} | ${displayVendor}`,
vendor: displayVendor,
@@ -301,6 +302,13 @@ async function shopifyPublishOnlineStore(productId) {
metafields: [
{ namespace: 'custom', key: 'mfr_sku', value: String(mfr || ''), type: 'single_line_text_field' },
...(collection ? [{ namespace: 'custom', key: 'collection', value: String(collection), type: 'single_line_text_field' }] : []),
+ // spec facts migrated from the old body <ul> → the metafields the theme renders (TK-10039)
+ ...(width ? [{ namespace:'custom', key:'width', value:String(width), type:'single_line_text_field' }, { namespace:'global', key:'width', value:String(width), type:'single_line_text_field' }] : []),
+ ...(repeat ? [{ namespace:'custom', key:'pattern_repeat', value:String(repeat), type:'single_line_text_field' }] : []),
+ ...(match ? [{ namespace:'global', key:'Match', value:String(match), type:'single_line_text_field' }] : []),
+ ...(fire ? [{ namespace:'custom', key:'fire_rating', value:String(fire), type:'single_line_text_field' }] : []),
+ ...(composition ? [{ namespace:'custom', key:'material', value:String(composition), type:'multi_line_text_field' }] : []),
+ ...(sellUnit ? [{ namespace:'global', key:'unit_of_measure', value:String(sellUnit), type:'single_line_text_field' }] : []),
],
};
← 8f6d032 auto-save: 2026-07-13T14:55:38 (1 files) — package.json
·
back to New Import Viewer
·
TK-10039: phase8-fix/shopify-push.js migrates width to metaf fae9d94 →