[object Object]

← back to Greenland Onboard

importer: map global.width metafield (Carnegie-class fix)

eb421f777436a76f23b86c9cdd3fa53a4c99f267 · 2026-08-31 10:53:28 -0700 · Steve

Files touched

Diff

commit eb421f777436a76f23b86c9cdd3fa53a4c99f267
Author: Steve <steve@designerwallcoverings.com>
Date:   Mon Aug 31 10:53:28 2026 -0700

    importer: map global.width metafield (Carnegie-class fix)
---
 scripts/publish-samples.mjs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/publish-samples.mjs b/scripts/publish-samples.mjs
index 545a24e..4c20be3 100644
--- a/scripts/publish-samples.mjs
+++ b/scripts/publish-samples.mjs
@@ -60,7 +60,13 @@ for (const r of slice) {
       status: 'active', tags,
       options: [{ name: 'Size' }],
       variants: [{ option1: 'Sample', price: '4.25', sku: r.dwSku, taxable: true, requires_shipping: true, inventory_policy: 'continue', fulfillment_service: 'manual', inventory_management: null }],
-      metafields: [{ namespace: 'custom', key: 'mfr_number', type: 'single_line_text_field', value: String(r.mfrModel || '') }],
+      metafields: [
+        { namespace: 'custom', key: 'mfr_number', type: 'single_line_text_field', value: String(r.mfrModel || '') },
+        // TK-11024: width metafield (Carnegie-class). enriched.json already carries r.width.
+        ...(r.width && String(r.width).trim()
+          ? [{ namespace: 'global', key: 'width', type: 'single_line_text_field', value: String(r.width).trim() }]
+          : []),
+      ],
       images: img ? [{ attachment: img, alt: r.alt }] : [],
     } };
     const res = await sh(`/products.json`, { method: 'POST', body: JSON.stringify(payload) });

← a21e610 remove stray tracked index.lookbook.bak.html (served backup  ·  back to Greenland Onboard  ·  governance(TK-11370): make live-by-default Shopify writers d cc826bb →