npm i
npm audit fix
Find your stripe secret key here. (Consider using /test/apikeys during testing).
echo STRIPE_SECRET=sk... > .env
edit config.toml
hugo server
Create products in content/2020/
Structure of product content:
content/YYYY/SKU/index.md
In content/2020/wrt1/index.md
the Front
Matter is the single
source of truth for product. From public/*/index.json
, the product listing
in JSON are synced with Stripe's backend, via make
.
The individual product pages then reference the required client-only
checkout
Price ID from the data/price
directory via Hugo Data
templates.
You don't need to create your product on stripe; stripe-sync.sh
does this for you.
make
Move the contents of public
to your webserver.
Follows that of https://useshoppingcart.com/usage/cartprovider/ in layouts/_default/single.html
.
How to advertise delivery limitations ASAP, as to not waste anybodies time?
For example https://online.vicsmeat.com.au/ asks for a post code off the bat.
Resolution: Offer a button to enable GPS to autofill their location but also allow them to type it in.
Stripe has a shipping_address_collection.allowed_countries as documented in validateCartItems session