Skip to content

Adding Shipping Calculation based on Stripe Address Form#114

Open
JDLanctot wants to merge 4 commits intosadmann7:mainfrom
JDLanctot:shipping-ui
Open

Adding Shipping Calculation based on Stripe Address Form#114
JDLanctot wants to merge 4 commits intosadmann7:mainfrom
JDLanctot:shipping-ui

Conversation

@JDLanctot
Copy link
Copy Markdown
Contributor

A few notes about this PR:

  1. The updated shipping price and total are reflected in the UI but not the stripe PaymentIntent. This is still a TODO.
  2. A new file called checkout-content.tsx was created to have some allow for "use client" for the majority of the checkout components. This probably should eventually become a shell, but as there was already a checkout-shell deeper in the checkout structure I didn't want to create a second shell to confuse things.
  3. The next.config.js had to be updated because without the changes, there is some sort of hexoid error (which likely has to do with the dependencies introduced with EasyPost).
  4. Getting shipping rates is handled with a server action when the switch for confirming the address is toggled, which makes it so that the Pay button is no longer disabled and shipping rates are rendered. Changing the shipping address resets the confirm switch so that shipping must be recalculated on the next switch toggle.
  5. Currently using the lowest shipping rate, but this can be changed if required.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 16, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @sadmann7 on Vercel.

@sadmann7 first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant