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

How to get shipping address on order confirmation page? #846

Open
flyingL123 opened this issue Apr 24, 2020 · 6 comments
Open

How to get shipping address on order confirmation page? #846

flyingL123 opened this issue Apr 24, 2020 · 6 comments

Comments

@flyingL123
Copy link

Is there any way to access the shipping addresses on the order from the confirmation page with the SDK? After calling service.loadOrder(orderId), then state.data.getOrder() I do not see any part of the order object that mentions anything about a shipping address. Is this expected?

@lpschz
Copy link
Contributor

lpschz commented Apr 27, 2020

Hi @flyingL123, unfortunately, our Storefront API do not return any information related to the shipping address at this stage. You could however use Orders v2 https://developer.bigcommerce.com/api-reference/orders/orders-api, note though that it's a server-to-server API.

Just out of curiosity, is there any specific use case you want to enable with the shipping address?

@flyingL123
Copy link
Author

Thanks @capsula4. The use case isn't anything crazy. We are just building our own checkout and wanted to show the shipping address on the order confirmation page. We were also hoping to show the last 4 of the credit card used if it was paid for via credit card, but that doesn't look to be possible either.

@thanicricket
Copy link

Use storefront internal API call (https://developer.bigcommerce.com/api-docs/cart-and-checkout/cart-and-checkout-overview) to get the order details in the order confirmation page.

@corygottschalk
Copy link

Hey @capsula4,

I noticed that the consignments array was added to the response of the storefront GET order request: https://developer.bigcommerce.com/api-reference/storefront/orders/order/ordersbyorderidget

Do you think it would now be possible to include this in the getOrder() call as well as the getShippingAddress() call (and possibly a new getOrderConsignments() call if it makes sense).

@animesh1987
Copy link
Contributor

Hey @gotts2swim, we will be looking at adding the said methods, just depends on where this gets prioritised. But is definitely on our mind.

@corygottschalk
Copy link

@animesh1987 That's awesome! I have a client that needs this feature for their custom checkout so I look forward to it! In the meantime, I'll make a second request to the endpoint for now.

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

No branches or pull requests

5 participants