← back to Elitis Price 2026
exec/probe_units.py
28 lines
import json, sys
sys.path.insert(0,'exec/lib')
from shopify import gql
Q="""query($q:String!){ products(first:50, query:$q){ edges{ node{
title vendor status
variants(first:15){ edges{ node{ title sku price inventoryPolicy
selectedOptions{name value} } } }
} } } }"""
print("===== ELITIS with >1 variant (any already priced?) =====")
d=gql(Q,{"q":'vendor:"Elitis" status:active'})
cnt=0; multi=0
for e in d["products"]["edges"]:
n=e["node"]; vs=[v["node"] for v in n["variants"]["edges"]]; cnt+=1
if len(vs)>1:
multi+=1
print(n["title"])
for x in vs:
print(" ", x["sku"], "|", x["title"], "|", x["price"], "|", x["selectedOptions"])
print(f"(elitis active: {cnt} shown, {multi} with >1 variant)")
print("\n===== label examples for units =====")
for term in ['Sold Per Panel','Double Roll','Sold Per Roll','Sold Per Double Roll','Sold Per Bolt']:
d=gql("""query($q:String!){ productVariants(first:6, query:$q){ edges{ node{ title sku price selectedOptions{name value} product{title vendor} } } } }""",
{"q":f'title:"{term}"'})
for e in d["productVariants"]["edges"]:
n=e["node"]; print(f" [{term}] {n['product']['vendor']} :: {n['title']!r} :: sku={n['sku']} :: {n['price']}")