← back to Designer Wallcoverings
mirror sync now carries featuredImage into image_url (closes the batch-image blind spot found via Meilin Pebblestone)
f3d8f23f67463d035ed497db4e8382a5d6467feb · 2026-07-21 17:22:17 -0700 · Steve
Files touched
M shopify/scripts/sync-shopify-products.js
Diff
commit f3d8f23f67463d035ed497db4e8382a5d6467feb
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jul 21 17:22:17 2026 -0700
mirror sync now carries featuredImage into image_url (closes the batch-image blind spot found via Meilin Pebblestone)
---
shopify/scripts/sync-shopify-products.js | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/shopify/scripts/sync-shopify-products.js b/shopify/scripts/sync-shopify-products.js
index ef66e353..2ec37e7e 100644
--- a/shopify/scripts/sync-shopify-products.js
+++ b/shopify/scripts/sync-shopify-products.js
@@ -112,6 +112,9 @@ async function syncProducts(quickMode = false) {
descriptionHtml
createdAt
updatedAt
+ featuredImage {
+ url
+ }
variants(first: 100) {
edges {
node {
@@ -177,9 +180,10 @@ async function syncProducts(quickMode = false) {
sku, variant_id, variant_sku, tags, status,
created_at_shopify, updated_at_shopify, synced_at,
body_html, variant_count, min_variant_price,
- has_sample_variant, has_product_variant, has_description
+ has_sample_variant, has_product_variant, has_description,
+ image_url
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, NOW(),
- $13, $14, $15, $16, $17, $18)
+ $13, $14, $15, $16, $17, $18, $19)
ON CONFLICT (shopify_id) DO UPDATE SET
handle = EXCLUDED.handle,
title = EXCLUDED.title,
@@ -196,6 +200,7 @@ async function syncProducts(quickMode = false) {
has_sample_variant = EXCLUDED.has_sample_variant,
has_product_variant = EXCLUDED.has_product_variant,
has_description = EXCLUDED.has_description,
+ image_url = EXCLUDED.image_url,
synced_at = NOW()
`, [
product.id,
@@ -215,7 +220,8 @@ async function syncProducts(quickMode = false) {
minPrice,
hasSample,
hasProduct,
- hasDesc
+ hasDesc,
+ product.featuredImage?.url || null
]);
totalSynced++;
} catch (err) {
← f6b3ebec auto-save: 2026-07-21T17:08:42 (1 files) — shopify/scripts/c
·
back to Designer Wallcoverings
·
wire activation gate into activate-publish-v2 + make sync -- 63ffa88a →