-
Notifications
You must be signed in to change notification settings - Fork 215
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
Comments
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? |
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. |
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. |
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). |
Hey @gotts2swim, we will be looking at adding the said methods, just depends on where this gets prioritised. But is definitely on our mind. |
@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. |
Is there any way to access the shipping addresses on the order from the confirmation page with the SDK? After calling
service.loadOrder(orderId)
, thenstate.data.getOrder()
I do not see any part of the order object that mentions anything about a shipping address. Is this expected?The text was updated successfully, but these errors were encountered: