chec / commercejs-nextjs-demo-store

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.
https://commercejs-demo-store.netlify.app/
BSD 3-Clause "New" or "Revised" License
1.07k stars 206 forks source link

[CHEC-386] - Feature/checkout #12

Closed john-raymon closed 4 years ago

john-raymon commented 4 years ago

You're all going to eat me alive for the amount of file changes but I promise they're related to the PR and also due to the structure of the app. I went ahead and resolved all the React unique key prop errors that were cluttering the console, so that may be a reason for the amount of file changes.

Helpful recorded demo I uploaded to the internal Slack https://madebychec.slack.com/archives/C024F797F/p1588297207003500

john-raymon commented 4 years ago

I don't get why the checks aren't passing but every works locally, even the build.

robbieaverill commented 4 years ago

The build error is this:

1:30:08 PM: Error occurred prerendering page "/checkout/1". Read more: https://err.sh/next.js/prerender-error:
1:30:08 PM: TypeError: Cannot read property 'map' of undefined
john-raymon commented 4 years ago

@robbieaverill @jaepass Can I just remove remove all checkout pages but checkout/index and checkout/confirm? As the others aren't being used and yarn deploy works when I remove them.

jaepass commented 4 years ago

yes i was thinking we should! during final review can go over full project again and remove all redundant or unused components/pages to clean the repo up. so currently you pulled in the checkout/2 layout into the full view right? can we also remove the login and

'save' features as per linear task @john-raymon

john-raymon commented 4 years ago

Yes, I basically moved checkout.js to checkout/index.js). Nice, will update now. Also removing the checkout pages causing errors

eufandem commented 4 years ago

Looking great @john-raymon , I agree with Jaeriah we should do a final review of the project next week. Ie Cart > Checkout on checkout page (redundant) and noticed the "order notes" aren't being captured in the order and displayed in the dashboard.

jaepass commented 4 years ago

agree @eufandem, final review can be pulled in! I'm going through and making a list of review points on my end that i can see, think might raise as issues. the orderReceipt object isn't wired up in order view in john's pr yet as my commits are behind his, will push up once this pr gets merged to make sure all flows correctly!

john-raymon commented 4 years ago

Adding the order notes field now

john-raymon commented 4 years ago

Pushed up commit setting up the orderNotes form field. Let me know if good to merge. Should we leave the discount stuff for a separate PR with paypal gateway flow? To not bloat this up more.

john-raymon commented 4 years ago

Oops, it should always be unique, will fix. thanks @ScopeyNZ