-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Set price on quote item instead of base_price #36878
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?
Set price on quote item instead of base_price #36878
Conversation
Hi @hostep. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
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 |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
None of the failing tests seem to indicate a problem so far, they are all flaky results I think:
Just to be sure, let's try to run these again to be sure ... @magento run Functional Tests B2B, Functional Tests CE, Integration Tests, Functional Tests EERSTE |
@magento run Functional Tests B2B, Functional Tests CE, Integration Tests, Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Only Functional Tests B2B is failing now with:
&
Let's try that one again @magento run Functional Tests B2B |
@magento run Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Since all tests passed, can we assume that nothing broke by doing this change? |
3ac1153
to
68a92b3
Compare
Rebased on latest |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@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.
Thanks @hostep for the contribution!
The PR changes looks good to me.
For automated test, let me ask the internal team member to add the same. @engcom-Dash please do the needful.
Thanks
@magento run all tests |
@magento run all tests |
1 similar comment
@magento run all tests |
Failed to run the builds. Please try to re-run them later. |
@magento run Database Compare |
If anyone wonders about the changes from this commit, here's some context: |
Helllo @hostep & @engcom-Hotel, As discussed in the slack chat, I have added commit to address the minicart item price issue. Also @engcom-Hotel I can see a Unit Test has been already added for the updateItemTaxInfo() in the app/code/Magento/Tax/Test/Unit/Model/Sales/Total/Quote/CommonTaxCollectorTest.php. let me know anything more needed from my side. I feel the failing tests are not related to the changes done in this PR. Could you please review the PR. ? |
Hi @hostep, Thanks for the collaboration & contribution! ✔️ QA PassedPreconditions:
Steps to reproduce
Before: ✖️ ![]() ![]() After: ✔️ ![]() ![]() Builds are failed. Hence, moving this PR to Extended Testing. Thanks. |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE, Unit Tests |
The consistent test failures for Functional B2B are known Issues and JIRA is raised for them. other failures are inconsistent. They neither part of PR nor failing because of the PR changes Known Issues: The consistent test failures for Functional CE is known Issues and JIRA is raised for the same. Other failures are inconsistent and seems to be flaky. They neither part of PR nor failing because of the PR changes. ![]() Known Issues: The consistent test failure for Functional EE is known Issues and JIRA is raised for the same. Other failures are inconsistent and seems to be flaky. They neither part of PR nor failing because of the PR changes. Known Issues: Hence moving this PR in Merge In Progress. |
Description (*)
For some unknown reason, a quote item's price gets incorrectly set to the base_price instead of the price.
Which means that if you have multiple currencies in one website on the frontend, both price & base_price are stored in the database in the base currency. We would expect the price to be in the other currency and not the base currency.
The comment above the changed line of code seems to indicate this was done on purpose, but I have no idea why.
The base_price is set correctly on the quote item. It's just the price itself that seems to be wrong.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
quote_item
, the columnsprice
andbase_price
base_price
should contain100
, theprice
should contain the value from the other currency.Questions or comments
I don't have the knowledge or time and energy to add a new automated test for this scenario, so it would be appreciated if assistance can be given here for this.
Contribution checklist (*)
Resolved issues: