-
Notifications
You must be signed in to change notification settings - Fork 214
@W-19364130 feat: fix shipping costs summary mode pricing #3240
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
Changes from 2 commits
30f49b8
1e1b875
33a38e5
e7aa7e9
ea08bde
c891dfc
ecc5894
f697e12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -349,13 +349,7 @@ export default function ShippingMethods() { | |
| // Multiple shipments summary | ||
| <Stack spacing={2}> | ||
| {deliveryShipments.map((shipment) => { | ||
| const shippingItem = basket?.shippingItems?.find( | ||
| (item) => item.shipmentId === shipment.shipmentId | ||
| ) | ||
| const itemCost = | ||
| shippingItem?.priceAfterItemDiscount !== undefined | ||
| ? shippingItem.priceAfterItemDiscount | ||
| : shippingItem?.price || 0 | ||
| const itemCost = shipment.shippingTotal || 0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the different between basket and shipment, and why is checking priceAfterItemDiscount no longer necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sf-emmyzhang but it is possible to have a surcharge or other fees i.e £10.00 surcharge on first shipment So Actual would be: £15.99 + £5.99 = £21.98, - which is not the case. Fix is to use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha, thanks for explaining!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sf-emmyzhang also just realized I never answered part of your qn |
||
| return ( | ||
| <Box key={shipment.shipmentId}> | ||
| <Flex justify="space-between" w="full"> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.