Skip to content

[Issue] Quote is loaded without totals #39205

Closed
@m2-assistant

Description

This issue is automatically created based on existing pull request: #39201: Quote is loaded without totals


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 (*)

  1. Load quote from session
  2. use getOriginalPrice method on quote items

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 (*)

  • Pull request has a meaningful description of its purpose
    All commits are accompanied by meaningful commit messages
    All new or changed code is covered with unit/integration tests (if applicable)
    README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
    All automated tests passed successfully (all builds are green)

Activity

added
Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Reported on 2.4.xIndicates original Magento version for the Issue report.
on Sep 24, 2024
added
Priority: P2A defect with this priority could have functionality issues which are not to expectations.
on Sep 24, 2024
m2-assistant

m2-assistant commented on Sep 25, 2024

@m2-assistant
Author

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    5. Add label Issue: Confirmed once verification is complete.
    6. Make sure that automatic system confirms that report has been added to the backlog.
added this to Pull Request In Progress in High Priority Backlogon Sep 25, 2024
engcom-November

engcom-November commented on Oct 4, 2024

@engcom-November
Contributor

Hello @thomas-kl1,

Thank you for the report and collaboration!

We are not able to load quote from the session, can you share some insight on this.
Tried with below snippet with checkoutSession of class \Magento\Checkout\Model\Session:

$allItems = $this->checkoutSession->getQuote()->getAllVisibleItems();

foreach ($allItems as $item) {
      var_dump(print_r($item-> getOriginalPrice(), true));
}

We are getting empty array.

19 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Issue: needs updateAdditional information is require, waiting for responsePriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.xIndicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    [Issue] Quote is loaded without totals · Issue #39205 · magento/magento2