-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Requesting price summary fragment in shipping info mutation. #2445
Requesting price summary fragment in shipping info mutation. #2445
Conversation
|
Performance Test Results The following fails have been reported by WebpageTest. These numbers indicates a possible performance issue with the PR which requires further manual testing to validate. https://pr-2445.pwa-venia.com : LH Performance Expected 0.85 Actual 0.58, LH Best Practices Expected 1 Actual 0.92 |
It is possible to configure the back-end to calculate tax based on billing address. Would it make sense to add the same PriceSummaryFragment to the set billing address mutation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense that we want the PriceSummaryFragment
included in the SET_GUEST_SHIPPING_MUTATION
mutation but not in the GET_SHIPPING_INFORMATION
query.
packages/venia-ui/lib/components/CheckoutPage/ShippingInformation/shippingInformation.gql.js
Show resolved
Hide resolved
Thanks for pointing this out; I would say yes. If we find that we're overfetching and that is problematic, we can find a way to conditionally include the fragment based on the back-end configuration. |
Good callout. I could see how it would make more sense to have it configured that way, too. |
Nice point @fooman. I have included the fragment in the setBillingAddressMutation as well and try to set the billing address state like Texas to remove the taxes but unfortunately, the backend didn't recognize that. I will include the fragment so if the backend supports it, you should see the tax update on billing address change. @jimbo @supernova-at any thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. Let's let QA have a shot at it. 👍
@revanth0212 Zero checkout flow breaks!
Issue - Even though order total is greater than gift card amount, payement module still stale. |
Nice catch @dpatil-magento. There are 2 things we have to note here.
|
…ub.com/magento/pwa-studio into revanth/checkout_page_price_update_fix
Just to update here, that fragment should exist already and the list of available shipping methods should already update on shipping address change. |
Yeah, you are right. Found it. Thanks Andy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but spotted an odd linter line that should be corrected. Please take a look.
} | ||
} | ||
${AvailablePaymentMethodsFragment} | ||
`; | ||
|
||
/* eslint-disable graphql/required-fields */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR, but couldn't help but notice this rule get disabled, and never re-enabled. This is probably preventing any file after this from being properly linted. Consider fixing in this scope, or please create a followup task to resolve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch Tommy. Havn't noticed that. Also looks like my linter is not working 😓 . Fixed it in 06608bf
@@ -1,5 +1,8 @@ | |||
import gql from 'graphql-tag'; | |||
|
|||
import { PriceSummaryFragment } from '../../CartPage/PriceSummary/priceSummaryFragments'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On line 28 in this file too, I think we intended to turn the lint rule back on.
Description
The price summary is not updated on submitting shipping information on the checkout page. This is because the price summary is not being fetched in the mutation result.
Solved by adding price summary fragment to shipping information mutation.
Related Issue
Closes PWA-614
Verification Stakeholders
@tjwiebell
Verification Steps
@fooman mentioned there is a setting in the admin panel to perform tax calculation based on billing address instead. @dpatil-magento when you are testing, try to check for that option as well. The code has logic to render tax changes on billing address change as well.
Screenshots / Screen Captures (if appropriate)
Lone Star State (No Tax)

Golden State (😮 Tax)

Checklist
No tests needed. It is a GQL update.