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

Show Shipping method validation error to customer #114

Closed eufandem closed 4 years ago

eufandem commented 4 years ago

If a shipping method is not selected at the checkout the customer should be made aware of what they need to do to complete the checkout.

Proposed solutions:

pierrolabo commented 4 years ago

Hi everyone, I'm poking around for fun ... i'm able to highlight the shipping method field if nothing is selected when we press the checkout button but unfortunately the API doesn't return me available shipping options for any countries ( https://api.chec.io/v1/checkouts/chkt_75v7GqzbkLREXl/helper/shipping_options?country=CN )

JoelJJoseph commented 4 years ago

The method of shipping is not selected at the checkout.

The notification bar should be select shipping order to complete the order. Highlight the Shipping Method field

jaepass commented 4 years ago

Currently only 84 countries are included arbitrarily in the one shipping zone for this demo account. The reason why the shipping option isn't showing in the dropdown is because a selected country is not included in the demo account. We have a checkout shipping helper that can help with populating only the countries that are included for the checkout token and this particular checkout helper is not being used for the checkout form. Fixes for improving the checkout flow:

robbieaverill commented 4 years ago

You could also disable the checkout button until the shipping method has been selected

drobiu commented 4 years ago

Hey, can I try tackling that issue?

jaepass commented 4 years ago

yes definitely go for it thanks!

tacoelho commented 4 years ago

As no one was assigned I made a PR.

Abhi947223 commented 4 years ago

I have gone through documentation/readme but not able to run the localserver on my machine

asha15 commented 4 years ago

Can i know does this issue was solved?

ScopeyNZ commented 4 years ago

The issue is still open, but there's a PR to fix it that's in review right now (#118)

SHROYETA20 commented 4 years ago

You could also disable the checkout button until the shipping method has been selected.

ShraddhaGeek commented 4 years ago

Can I take if this is still open?

jaepass commented 4 years ago

The issue is free for anyone to pick up! Just submit a pr for it for review!

drobiu commented 4 years ago

I've created a pr for this issue