-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
2.4.5 EE quote total collector collect billing address totals #37346
Comments
Hi @alexmtch. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-November. Thank you for working on this issue.
|
✅ Jira issue https://jira.corp.adobe.com/browse/AC-9195 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Hello @alexmtch, Thank you for reporting and collaboration. We have tried to reproduce this on 2.4-develop. The issue seem to be reproduible when debugging Please refer the screenshots below:
Hence confirming the issue. Thanks. |
Preconditions and environment
Steps to reproduce
Add a product to cart using a graphql request
Expected result
Billing address should not be used to collect totals
Actual result
Billing address is to collect totals and because it's a billing, it's totals will always return no charges which is a waste of execution time.
Additional information
In
vendor/magento/module-quote/Model/Quote/TotalsCollector.php
collect
methodWhy
foreach ($quote->getAllAddresses() as $address) {
?Using
$quote->getAllAddresses()
will return all adresses including billing. In this case why the billing is usefull to collect totals ?We could not use here
$quote->getAllShippingAddresses()
?We can see in the bellow example there is 2 executions of
collectAddressTotals
(one for my billing and one for my shipping). It could optimise the add to cart process to make this changes.Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: