← back to Dw Signup Fulfillment

theme-proposals/loggedin-trade-entry/MEMO.md

35 lines

# TK-10021 — Logged-in designers can't reach Apply-for-Trade

**Store:** designer-laboratory-sandbox.myshopify.com · **Live theme:** 144396058675 (main)
**Chosen approach:** *Auto-render trade-only view* (Steve, 2026-07-28)
**Status:** dry-run PASSED (all anchors 1×, backups written). Deploy is Steve-gated.

## Bug
`layout/theme.liquid:1360` rendered the sign-in modal `{% unless customer %}` — logged-out
only. The modal is the *only* host of the Apply-for-Trade form, so the instant a designer
signs up (now authenticated) the trade form vanishes. Backend `/trade/apply` was always fine;
the entry point disappeared.

## Fix (3 anchored edits — see deploy.py)
1. **theme.liquid:1360** gate → `{% unless customer.tags contains 'trade' %}`
   (renders for logged-out AND logged-in non-trade; hides only for already-`trade` customers).
2. **snippets/dw-signin-modal.liquid** — wrap returning-sign-in / offer / toggle / Google /
   retail blocks in `{%- unless customer -%}`; add a logged-in `Apply for Trade Pricing`
   header; default-show + prefill the trade form (`{{ customer.email }}`, company).
3. **templates/customers/account.liquid** — add an `Apply for Trade Pricing →` trigger
   (`data-dw-signin`) shown only to non-trade customers; it opens the (now-rendered) modal
   straight to the trade-only view.

## Deploy
```
cd theme-proposals/loggedin-trade-entry && python3 deploy.py            # dry-run (default)
cd theme-proposals/loggedin-trade-entry && python3 deploy.py --apply    # Steve-gated live PUT
```
deploy.py backs up each live asset to `backups/` before patching and aborts fail-loud if any
anchor drifted. Rollback = PUT the matching `backups/*.bak` back.

## Verify after apply
Signed in as a NON-trade customer → account page shows "Apply for Trade Pricing →" → opens
the modal to the trade form (email prefilled) → submit → `/trade/apply` → review email.
A `trade`-tagged customer sees neither the CTA nor the modal.