You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read cart info (Price ID / quantity of each item) from localStorage in /pages/checkout/index.tsx and send as a POST body to /pages/api/checkout_sessions.js (could be a good one for@RonanG cause he did the cart)
Host - either move Stripe API routes to api.coopsoc.com.au, pay to host the entire website, or see if it'll work with GitHub Pages. Set up live API keys
Upload data to live stripe account
Fix /cart page - add and subtract don't update localStorage, so do nothing
On load of /merch, read cart from localStorage
Should do
Make the return page not look like garbage (just copy the style from another page)
Mobile layout (single column /merch, make /cart legible)
Convert all images to JPEG / compress (for load times)
Make addToCart function update localStorage, e.g. stealing logic from goToCart (probably move to function used by both)
If you added price ID to variants (merch.ts getAllProductsAndVariants), constructing cartWithDetails in merch.tsx goToCart / new function could avoid needing to do another find through repo.products.find
Could also refactor to do repo.variants.foreach / repo.variants.filter then finding the corresponding cart item, given the size of each
Must do
Should do
addToCartfunction update localStorage, e.g. stealing logic fromgoToCart(probably move to function used by both)variants(merch.tsgetAllProductsAndVariants), constructingcartWithDetailsin merch.tsxgoToCart/ new function could avoid needing to do another find throughrepo.products.findrepo.variants.foreach/repo.variants.filterthen finding the correspondingcartitem, given the size of eachNice to have
quantitydrop-down to the cart.