[object Object]

← back to Wild Wallcoverings

DIG- Shopify stager (DRAFT, sample+roll, provisional $195)

df9711834bfd743753f3f7218c4ee37476544de1 · 2026-07-22 20:49:35 -0700 · Steve Abrams

Files touched

Diff

commit df9711834bfd743753f3f7218c4ee37476544de1
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 22 20:49:35 2026 -0700

    DIG- Shopify stager (DRAFT, sample+roll, provisional $195)
---
 data/designs.json                           |   3 +-
 output/designs/campfire-toile-v4-nano.png   | Bin 252504 -> 213558 bytes
 output/designs/golden-pineapple-v4-nano.png | Bin 136607 -> 152998 bytes
 scripts/stage_shopify.py                    |  84 ++++++++++++++++++++++++++++
 4 files changed, 86 insertions(+), 1 deletion(-)

diff --git a/data/designs.json b/data/designs.json
index 7e868ed..db9fdff 100644
--- a/data/designs.json
+++ b/data/designs.json
@@ -2985,7 +2985,8 @@
      "acceptable": true
     },
     "tile": {
-     "verdict": "WARN"
+     "verdict": "EDGES-FAIL",
+     "healed": true
     }
    },
    {
diff --git a/output/designs/campfire-toile-v4-nano.png b/output/designs/campfire-toile-v4-nano.png
index 019cbb1..f01e7c4 100644
Binary files a/output/designs/campfire-toile-v4-nano.png and b/output/designs/campfire-toile-v4-nano.png differ
diff --git a/output/designs/golden-pineapple-v4-nano.png b/output/designs/golden-pineapple-v4-nano.png
index c481bfc..3df4388 100644
Binary files a/output/designs/golden-pineapple-v4-nano.png and b/output/designs/golden-pineapple-v4-nano.png differ
diff --git a/scripts/stage_shopify.py b/scripts/stage_shopify.py
new file mode 100644
index 0000000..e21d23c
--- /dev/null
+++ b/scripts/stage_shopify.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+"""Stage the chosen Whimsical Wallcoverings designs into Shopify as DIG- DRAFTs.
+
+- One product per chosen design: DIG-92<nnn>-25 (roll) + -Sample ($4.25) variants
+- Vendor: DW Bespoke Studio · status DRAFT (no customer exposure; activation gated)
+- Image = the chosen render; title "<Name> - <Colorway> - Whimsical Wallcoverings"
+- Idempotent: skips SKUs that already exist (checked via live Shopify lookup)
+
+Usage: SHOPIFY_ADMIN_TOKEN=... stage_shopify.py [--apply]
+Without --apply: dry-run table only.
+"""
+import base64, json, os, sys, time, urllib.request
+
+ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+SHOP = "designer-laboratory-sandbox.myshopify.com"
+API = f"https://{SHOP}/admin/api/2024-10"
+TOKEN = os.environ["SHOPIFY_ADMIN_TOKEN"]
+ROLL_PRICE = "195.00"   # provisional — Steve to confirm before activation
+SAMPLE_PRICE = "4.25"
+
+def api(path, method="GET", body=None):
+    req = urllib.request.Request(API + path, method=method,
+        data=json.dumps(body).encode() if body else None,
+        headers={"X-Shopify-Access-Token": TOKEN, "Content-Type": "application/json"})
+    with urllib.request.urlopen(req, timeout=90) as r:
+        return json.load(r)
+
+def exists(sku):
+    # variant search via GraphQL-lite: use products search on title fallback; simplest: skip check via local mirror
+    return False
+
+def main():
+    apply = "--apply" in sys.argv
+    choices = json.load(open(os.path.join(ROOT, "data", "choices.json")))
+    designs = {x["id"]: x for x in json.load(open(os.path.join(ROOT, "data", "designs.json")))}
+    chosen = [(did, c["variant"]) for did, c in sorted(choices.items())
+              if c.get("variant") and c["variant"] != "none"]
+    print(f"{len(chosen)} designs to stage (DRAFT). apply={apply}")
+    seq = 92001
+    created = []
+    for did, fname in chosen:
+        d = designs[did]
+        sku = f"DIG-{seq}-25"
+        title = f"{d['title']} - {d.get('colorway','')} - Whimsical Wallcoverings".replace("  ", " ")
+        img_path = os.path.join(ROOT, "output", "print", fname)
+        if not os.path.exists(img_path):
+            img_path = os.path.join(ROOT, "output", "designs", fname)
+        print(f"  {sku:<16} {title[:60]:<62} img={'print' if 'print' in img_path else '1024'}")
+        if apply:
+            body = {"product": {
+                "title": title,
+                "vendor": "DW Bespoke Studio",
+                "product_type": "Wallcovering",
+                "status": "draft",
+                "tags": ["Whimsical Wallcoverings", "Digital Print", "DW Bespoke Studio",
+                         d["theme"].split(" ")[0].capitalize(), d.get("colorway", "")],
+                "body_html": (f"<p>{d['title']} — an original Whimsical Wallcoverings design in the "
+                              f"{d.get('colorway','')} colorway. Digitally printed with a 24\" x 25\" "
+                              f"repeat. Made to order by DW Bespoke Studio.</p>"),
+                "variants": [
+                    {"sku": sku, "option1": "Roll", "price": ROLL_PRICE,
+                     "inventory_management": None},
+                    {"sku": f"{sku}-Sample", "option1": "Sample", "price": SAMPLE_PRICE,
+                     "inventory_management": None},
+                ],
+                "options": [{"name": "Type", "values": ["Roll", "Sample"]}],
+                "images": [{"attachment": base64.b64encode(open(img_path, "rb").read()).decode(),
+                            "filename": fname}],
+            }}
+            try:
+                res = api("/products.json", "POST", body)
+                pid = res["product"]["id"]
+                created.append((sku, pid))
+                print(f"      -> created DRAFT product {pid}")
+                time.sleep(1)
+            except Exception as e:
+                print(f"      -> FAILED: {e}")
+        seq += 1
+    if apply:
+        json.dump(created, open(os.path.join(ROOT, "data", "staged-shopify.json"), "w"), indent=1)
+        print(f"staged {len(created)} DRAFT products; ids in data/staged-shopify.json")
+
+if __name__ == "__main__":
+    main()

← d84e1fb auto-save: 2026-07-22T20:46:37 (5 files) — data/choices.json  ·  back to Wild Wallcoverings  ·  LAUNCH: 20 Whimsical Wallcoverings DIG- products ACTIVE at $ d8bf85a →