Trade Portal
repo: ~/Projects/trade-portal · 9 commits · 0 in last 24h, 0 in last 7d ·
Skills used
- /shopify-catalog3
- /products2
- /cart2
- /net2
- /null1
- /proxy1
Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
ed2c486 · 2026-07-16 · Handle sample_only + buyable catalog fields; eliminate \$null price rendering
- loadCatalog() now maps buyable, sample_only, price (nullable), price_display,
product_url through from the refreshed shopify-catalog.json
- computePricing() short-circuits on sample_only/null price → pricing_rule 'on-request'
- /api/products passes buyable, sample_only, price_display, product_url to client;
cart_url is null for sample_only products
- price sorts use Infinity sentinel so null-price products sort gracefully
- cardHTML() uses price_display (pre-formatted string) everywhere — no \$null/\$NaN possible
- sample_only cards: show "Roll price on request" + "View on DW →" link; NO buy button
- buyable cards: unchanged — real price_display + qty + Buy on Shopify button
- 250 products total: 167 buyable, 83 sample_only
7904fa5 · 2026-07-16 · Add Buy on Shopify cart button, test-mode banner, trade pricing caveat
- TEST-MODE banner: warns checkout is live Shopify; PayPal toggle note
- Per-card: qty input + 'Buy on Shopify' link -> /cart/<variant_id>:<qty>
qty is adjustable; link updated via onclick before navigation
- Trade users see Phase-2 checkout caveat: Shopify charges store price,
not on-site trade/net estimate; ?discount=CODE param placeholder noted
- Non-Kravet trade price labeled 'est.' with inline caveat text
- Public view: retail only, trade null, no cost exposed (verified)
- Sort + density persist in localStorage; Color sort option added
- Admin cards: created date+time chip unchanged (HARD RULE preserved)
20df63d · 2026-07-16 · Switch product source to shopify-catalog.json; add cart permalink builder
- loadCatalog() reads data/shopify-catalog.json (real DW Shopify store, read-only)
- computePricing() driven by catalog price field (Shopify retail = MAP for Kravet)
- buildCartUrl(): https://checkout_domain/cart/<variant_id>:<qty>[?discount=CODE]
- /api/products returns variant_id + cart_url per product; never exposes cost
- Non-Kravet trade = est. retail x0.75; labeled 'standard-est-25pct' (clearly est.)
- Catalog cached in-memory after first load; no Shopify Admin token in app
File tree
9 files tracked. Click any to browse the source at HEAD.
rendered in 0ms