Add Fourthwall merch store with on-site cart - #20
Merged
Merged
Conversation
New /store page selling FT8AF merch through the Fourthwall shop (burnsoft-development-shop.fourthwall.com). The static build renders the hero, skeleton grid, cart panel, and all localized strings; store.js then fetches live products from the Fourthwall Storefront API client-side so prices and availability never go stale between deploys. Shoppers pick a variant (out-of-stock options disabled), build a cart on-page (persisted in localStorage), and check out via a Fourthwall cart created directly from the browser — the Storefront API is CORS-enabled and the token is public/read-only by design, so no server proxy is needed. Payment and shipping stay entirely on Fourthwall's hosted checkout. Cards show per-variant prices with compare-at strikethrough. The storefront token comes from FOURTHWALL_STOREFRONT_TOKEN at build time (see .env.example); without it the site still builds and /store renders a plain link to the Fourthwall shop, so CI needs no secret. Store nav/footer links added on every page, store_* analytics events wired into the existing Vercel Analytics click tracking, and all new strings translated across the 16 locale catalogs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Product links and the checkout redirect now use the shop domain from NEXT_PUBLIC_FW_CHECKOUT (e.g. shop.ft8af.app, the Fourthwall custom domain) instead of the *.fourthwall.com default. Scheme optional; bare hostnames get https://. Falls back to the fourthwall.com shop URL when unset, so builds without the var still work. Also ignore .vercel/.env* from `vercel link`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New /store page selling FT8AF merch through the Fourthwall shop, with an on-site cart — shoppers pick a size/color, build a cart on the page, and check out on Fourthwall's hosted checkout.
store.jsthen fetches products from the Fourthwall Storefront API client-side, so prices/availability never go stale between deploys.Intl.NumberFormat, persisted inlocalStorage.POST /v1/cartsdirectly from the browser (the Storefront API is CORS-enabled and the token is public/read-only by design — it can only list products and create carts), then redirects to the Fourthwall-hosted checkout. Payment and shipping never touch this site.FOURTHWALL_STOREFRONT_TOKENis read at build time (.env.exampledocuments it). Without it the site still builds —/storerenders a translated fallback linking to the shop — so CI needs no secret.textContent), neverinnerHTML; pagination is followed defensively (bounded, stops if the page param is ignored); API failure shows a translated error with a direct link to the shop;<noscript>fallback links to the shop.store_add_to_cart/store_checkout/ link-click analytics events wired into the existing Vercel Analytics tracking.check-i18npasses with the store keys at 100% coverage in every locale.Add
FOURTHWALL_STOREFRONT_TOKENto the Vercel project env (Production + Preview) so deployed builds bake the token in. Without it,/storeshows the link-to-shop fallback instead of the product grid.Verification
node build.mjsbuilds all 160 pages with and without the token (warns when missing);check-i18npasses (structural).dev-server.pyacross locales (en/es/ja/ar incl. RTL).Test plan
🤖 Generated with Claude Code