Commerce demo store built for the Jamstack. Built with Commerce.js, Next.js, and can be one-click deployed to Netlify. Includes product catalog, customer login, categories, variants, cart, checkout, payments (Stripe) order confirmation, and printable receipts.
added getState.() in cart action to check if cart exists already, if so don't retrieve again
added option to trace redux actions in store
I wasn't able to replicate the issue that came up during review, but was able to see at one point that the error was 'product variant cannot be found', so I would explicitly select the variant to add to cart each time in the UI and it was fine. when this error happened, would trigger an ADD_TO_CART_ERROR simply because no product variant was selected. if we want, maybe could rethink the UX around this, as each PDP would default to the first variant selected, instead we can somehow indicate that a variant must be selected in the UI.
was either the above or cache issue with cart.id, i will test again in live deploy preview. seemed that error went away, was hard to debug with no issue in dev
getState.()
in cart action to check if cart exists already, if so don't retrieve againstore
ADD_TO_CART_ERROR
simply because no product variant was selected. if we want, maybe could rethink the UX around this, as each PDP would default to the first variant selected, instead we can somehow indicate that a variant must be selected in the UI.cart.id
, i will test again in live deploy preview. seemed that error went away, was hard to debug with no issue in dev