← back to Koroseal Goodrich Audit
auto-save: 2026-07-27T20:24:23 (1 files) — fix_linsey_material.sh
210e46bf76db92edcf02943ff9fa399703fd11fa · 2026-07-27 20:24:30 -0700 · Steve Abrams
Files touched
Diff
commit 210e46bf76db92edcf02943ff9fa399703fd11fa
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 27 20:24:30 2026 -0700
auto-save: 2026-07-27T20:24:23 (1 files) — fix_linsey_material.sh
---
fix_linsey_material.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/fix_linsey_material.sh b/fix_linsey_material.sh
new file mode 100755
index 0000000..22efe83
--- /dev/null
+++ b/fix_linsey_material.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# GATED — set Material="PVC-Free (TPO)" on 7 Linsey PVC-Free SKUs mislabeled "Vinyl".
+# Audit: TK-10000. Run only after Steve approval. Optional: --sandscape also fixes 10 "Thermo".
+set -uo pipefail
+TOKEN="$(grep '^SHOPIFY_ADMIN_TOKEN=' ~/Projects/secrets-manager/.env | cut -d= -f2)"
+BASE="https://designer-laboratory-sandbox.myshopify.com/admin/api/2024-10"; H="X-Shopify-Access-Token: $TOKEN"
+LINSEY="7632316760115 7584785170483 7584914505779 7584914571315 7584914866227 7584914997299 7584915062835"
+SAND="7585004257331 7585004322867 7585004388403 7585004421171 7585004486707 7585004519475 7585004585011 7585004617779 7632314269747 7632314335283"
+IDS="$LINSEY"; [ "${1:-}" = "--sandscape" ] && IDS="$LINSEY $SAND"
+for pid in $IDS; do
+ mid=$(curl -s "$BASE/products/$pid/metafields.json?namespace=custom" -H "$H" | python3 -c 'import sys,json;print(next((str(m["id"]) for m in json.load(sys.stdin).get("metafields",[]) if m["key"]=="material"),""))')
+ body='{"metafield":{"namespace":"custom","key":"material","type":"multi_line_text_field","value":"PVC-Free (TPO)"}}'
+ if [ -n "$mid" ]; then
+ curl -s -o /dev/null -w "[%{http_code}] $pid updated\n" -X PUT "$BASE/metafields/$mid.json" -H "$H" -H "Content-Type: application/json" -d "{\"metafield\":{\"id\":$mid,\"value\":\"PVC-Free (TPO)\",\"type\":\"multi_line_text_field\"}}"
+ else
+ curl -s -o /dev/null -w "[%{http_code}] $pid created\n" -X POST "$BASE/products/$pid/metafields.json" -H "$H" -H "Content-Type: application/json" -d "$body"
+ fi
+ sleep 0.3
+done
+echo "MATERIAL FIX DONE"
← 1cfe97b prune 2 stale DELETED_FROM_SHOPIFY dup-dw_sku mirror rows (D
·
back to Koroseal Goodrich Audit
·
(newest)