[object Object]

← back to Designer Wallcoverings

auto-save: 2026-06-25T15:34:57 (4 files) — pending-approval/boost-filter-consolidation-2026-06-25 pending-approval/pdp-size-pills-2026-06-25/theme.liquid.STAGED vendor-scrapers/china-seas-refresh shopify/push-unhide-grid-prices-to-dev-theme.sh

98ab5eeb3d4f4d4a32f070714f894d90d2196581 · 2026-06-25 15:35:02 -0700 · Steve Abrams

Files touched

Diff

commit 98ab5eeb3d4f4d4a32f070714f894d90d2196581
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Jun 25 15:35:02 2026 -0700

    auto-save: 2026-06-25T15:34:57 (4 files) — pending-approval/boost-filter-consolidation-2026-06-25 pending-approval/pdp-size-pills-2026-06-25/theme.liquid.STAGED vendor-scrapers/china-seas-refresh shopify/push-unhide-grid-prices-to-dev-theme.sh
---
 .../pdp-size-pills-2026-06-25/theme.liquid.STAGED  |  2 +-
 shopify/push-unhide-grid-prices-to-dev-theme.sh    | 83 ++++++++++++++++++++++
 2 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/pending-approval/pdp-size-pills-2026-06-25/theme.liquid.STAGED b/pending-approval/pdp-size-pills-2026-06-25/theme.liquid.STAGED
index 19b47a12..c188954a 100644
--- a/pending-approval/pdp-size-pills-2026-06-25/theme.liquid.STAGED
+++ b/pending-approval/pdp-size-pills-2026-06-25/theme.liquid.STAGED
@@ -65,7 +65,6 @@
     .contact a { color: #2563eb; text-decoration: none; }
   </style>
 <script src="{{ 'dw-grid-control.js' | asset_url }}" defer></script>
-<script src="{{ 'dw-pdp-size-pills.js' | asset_url }}" defer></script>
 
 
 
@@ -441,6 +440,7 @@
   </script>
 
 <script src="{{ 'dw-grid-control.js' | asset_url }}" defer></script>
+<script src="{{ 'dw-pdp-size-pills.js' | asset_url }}" defer></script>
 
 
 
diff --git a/shopify/push-unhide-grid-prices-to-dev-theme.sh b/shopify/push-unhide-grid-prices-to-dev-theme.sh
new file mode 100644
index 00000000..fc6a99d8
--- /dev/null
+++ b/shopify/push-unhide-grid-prices-to-dev-theme.sh
@@ -0,0 +1,83 @@
+#!/usr/bin/env bash
+# Unhide product prices on the Boost-SD collection/search GRID tiles.
+#
+# Background: layout/theme.liquid carries a deliberate two-part CSS pair —
+#   (1) a HIDE block that blanks prices on .boost-sd__product-item grid tiles, and
+#   (2) a RESTORE block that re-shows prices on product pages + cart.
+# Steve's directive (2026-06-25): "do not hide prices." This removes ONLY the
+# HIDE block so prices render on grids too; the RESTORE block is left intact
+# (harmless — it just forces visible, which is the default).
+#
+# Drift-safe: PULLS the dev theme's current layout/theme.liquid, removes the
+# HIDE block in place, backs up the original, pushes, verifies. Never touches
+# the live/main theme.
+#
+#   THEME_TOKEN=shpat_xxx bash shopify/push-unhide-grid-prices-to-dev-theme.sh
+set -euo pipefail
+cd "$(dirname "$0")"
+
+STORE="designer-laboratory-sandbox.myshopify.com"
+API="2024-10"
+SECRETS="$HOME/Projects/secrets-manager/.env"
+TARGET_NAME="Updated copy of NewWall Template [Dev]"
+
+TOK="${THEME_TOKEN:-$(grep -hE '^SHOPIFY_THEME_TOKEN=' "$SECRETS" 2>/dev/null | head -1 | cut -d= -f2- | tr -d '"'"'"' ')}"
+[ -z "$TOK" ] && { echo "No theme token. Run:  THEME_TOKEN=shpat_xxx bash $0"; exit 1; }
+echo "token …${TOK: -4}"
+
+mkdir -p theme-backups
+python3 - "$STORE" "$API" "$TOK" "$TARGET_NAME" "theme-backups" <<'PY'
+import sys, json, re, urllib.request, urllib.parse, datetime
+store, api, tok, target_name, bkdir = sys.argv[1:6]
+H = {"X-Shopify-Access-Token": tok, "Content-Type": "application/json"}
+def get(url): return json.load(urllib.request.urlopen(urllib.request.Request(url, headers=H)))
+
+try:
+    themes = get(f"https://{store}/admin/api/{api}/themes.json")["themes"]
+except urllib.error.HTTPError as e:
+    print("THEMES LIST FAILED HTTP", e.code, e.read().decode()[:300]); sys.exit(1)
+print("themes:")
+for t in themes: print("  ", t["id"], t["role"], "|", t["name"])
+match = [t for t in themes if t["name"] == target_name] or [t for t in themes if t["role"]=="development"]
+match = [t for t in match if t["role"] != "main"]
+if not match: print(f'Target theme "{target_name}" not found.'); sys.exit(1)
+theme = match[0]; tid = theme["id"]
+print(f'=== target: {tid} "{theme["name"]}" (role={theme["role"]}) — live untouched ===')
+
+key = "layout/theme.liquid"
+q = urllib.parse.urlencode({"asset[key]": key})
+cur = get(f"https://{store}/admin/api/{api}/themes/{tid}/assets.json?{q}")["asset"]["value"]
+stamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
+bk = f"{bkdir}/theme.liquid.unhide-prices.dev-{tid}.{stamp}.bak"
+open(bk, "w").write(cur); print(f"backup: {bk} ({len(cur)} bytes)")
+
+# Remove the HIDE block: from the "Belt-and-suspenders" comment up to (but not
+# including) the "Restore on product pages" comment. Tolerant of whitespace.
+HIDE_RE = re.compile(
+    r"/\*\s*Belt-and-suspenders: CSS hide prices too\s*\*/.*?"
+    r"(?=/\*\s*Restore on product pages)",
+    re.S,
+)
+src, n = HIDE_RE.subn("/* DW 2026-06-25: grid price-hide REMOVED — show prices everywhere */\n", cur)
+if n == 0:
+    print("HIDE block not found (already removed?). No change."); sys.exit(0)
+
+# Sanity: the boost-grid display:none on price must be gone.
+if re.search(r"\.boost-sd__product-item\s*\[class\*=\"price\"\][^{}]*\{[^}]*display:\s*none", src):
+    print("ERROR: a boost grid price display:none still present after edit — aborting."); sys.exit(1)
+
+if src == cur:
+    print("no change needed."); sys.exit(0)
+
+body = json.dumps({"asset": {"key": key, "value": src}}).encode()
+req = urllib.request.Request(f"https://{store}/admin/api/{api}/themes/{tid}/assets.json",
+                            data=body, headers=H, method="PUT")
+try:
+    r = urllib.request.urlopen(req)
+    print("PUT HTTP", r.status, "OK", f"({len(src)} bytes, removed {len(cur)-len(src)} bytes of hide CSS)")
+except urllib.error.HTTPError as e:
+    print("PUT FAILED HTTP", e.code, e.read().decode()[:300]); sys.exit(1)
+
+print(f"\nPREVIEW (grid prices): https://www.designerwallcoverings.com/collections/all?preview_theme_id={tid}")
+print(f"PREVIEW (the GLM product): https://www.designerwallcoverings.com/products/eel-skin-sequin-glm-53010?preview_theme_id={tid}")
+PY

← 1c51fda5 v5.5.0 staged: PDP size pills + tear-sheet hide; add version  ·  back to Designer Wallcoverings  ·  v5.5.2: PDP black size pills live (5.5.0 staged, 5.5.1 scrip 21644ea1 →