Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(extension): CHECKOUT-000 Pass consignment includes to reload checkout command #1785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

animesh1987
Copy link
Contributor

What?

Pass consignment includes to reload checkout command.

Why?

Based on feedback of the extension is able to select shipping option, then reload command can take the shopper back to shipping step since shipping options are not reloaded on calling reloadCheckout command.

Testing / Proof

  • CI

@bigcommerce/team-checkout

@animesh1987 animesh1987 requested a review from a team as a code owner April 3, 2024 11:44
Copy link
Contributor

@davidchin davidchin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you check if it fixes the issue @petercossey's describing?

void checkoutService.loadCheckout(checkoutService.getState().data.getCheckout()?.id, {
params: {
// eslint-disable-next-line
include: ['consignments.availableShippingOptions'] as any,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
include: ['consignments.availableShippingOptions'] as any,
include: [CheckoutIncludes.AvailableShippingOptions],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going by this https://github.com/bigcommerce/checkout-js/blob/master/packages/core/src/app/checkout/Checkout.tsx#L203 but just tried to use the enum and seems to work fine. Seems like we have fixed the enum export issue overtime 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this enum usage throws an undefined error where CheckoutIncludes is not defined. Might need to investigate it later.

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.

2 participants