-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Quote is loaded without totals #39201
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
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @thomas-kl1. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento create issue |
@magento run all tests |
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.
Hello @thomas-kl1,
Thanks for the contribution!
But it seems the automated tests are failing due to this change. Hence please look into it.
Thanks
@magento run all tests |
@magento run all tests |
Functional test failures doesn't seems to be related to this changes. |
Integration test is weird because it tests for However, we only see a single usage of
protected function _afterLoad()
{
// collect totals and save me, if required
if (1 == $this->getTriggerRecollect()) {
$this->collectTotals()
->setTriggerRecollect(0)
->save();
}
return parent::_afterLoad();
} We found more occurrence if we look for update on the field Basically it seems that in some scenario in the codebase (with B2B and EE packages too) the flag or trigger_recollect are used together in order to keep consistency. However the flag does not have any effect if the What does it mean? It means that Now if we look at the following integration test: |
@magento run all tests |
Hi @thomas-kl1, Thank you for the detailed explanation of the difference between Regarding your suggestion about the It seems you already started updating the PR to modify this test case as you suggested, but still we can see failures in the integration tests. Specifically, ensuring it's only tested with disabled observers would prevent the infinite loop issue while still validating the core functionality. Once this change is implemented, we'll be able to move forward with the final review of this PR. Thank you for your thorough contribution to improving Magento's quote handling logic. Thanks |
Hello @engcom-Hotel I'm dedicated to work on this, it may take some time to sort things out and check all the tests. Regards, |
Description (*)
For exemple, when we load the quote on the checkout cart page, some fields are missing on the items because the totals have not been collected. For exemple the original price is missing.
It results in weird scenarios (for exempleif you want to print the diff between the final price and the original one on a quote item, an original price is 0).
Manual testing scenarios (*)
Questions or comments
Not sure why originally the check was forced to checking "false" when in almost every case the Magento core checkout for true (which is set when the totals are collected).
Also the collectTotals method is already proof as it already checks for the flag.
Contribution checklist (*)
Resolved issues: