-
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
Old price excluding TAX shown correct on Product Page #27832
Old price excluding TAX shown correct on Product Page #27832
Conversation
Hi @Krielkip. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
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.
Hi @Krielkip, thanks for the PR, it looks great! Kudos for updating the Unit Tests, really good work!
Please follow a small comment on the code, also, would you be able to update this PR with 2.4-develop? Thanks!
if ($this->getData('price_type') && $this->getData('price_type') !== 'finalPrice') { | ||
return 'base' . ucfirst($this->getData('price_type')); | ||
} | ||
return 'basePrice'; |
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.
if ($this->getData('price_type') && $this->getData('price_type') !== 'finalPrice') { | |
return 'base' . ucfirst($this->getData('price_type')); | |
} | |
return 'basePrice'; | |
if ($this->amountRender->getPriceType() === 'finalPrice') { | |
return 'basePrice'; | |
} | |
return 'base' . ucfirst($this->amountRender->getPriceType()); |
I guess it may be easier to understand the ===
instead of !==
. Also, it may be better to use the $this->amountRender->getPriceType()
instead of the getData
. What do you think?
Hi @Krielkip can you please look at #27832 (review)? |
# Conflicts: # app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php # app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Type/Configurable/Variations/PricesTest.php
@magento run all tests |
Hi @gabrieldagama, thank you for the review.
|
✔️ QA Passed Manual testing scenario:
Before: ✖️ New price and old price excluding TAX are the same ✖️ Simple Product ✖️ Configurable Product ✖️ Bundle Product After: ✔️ On product detail view page in frontend, old price and new price are displayed with and without TAX ✔️ Simple Product ✔️ Configurable Product ✔️ Bundle Product ✔️ Grouped Product |
Hi @Krielkip, thank you for your contribution! |
With this fix, the price excluding tax of the old price on an product on sale, is not being overwritten with JS. Also checked this for configurable products
Description (*)
I added the the option to add the baseOldPrice, so that in the javascript of the configurable product, all the default actions are the same. No price calculations has been changed.
Fixed Issues (if relevant)
Manual testing scenarios (*)
[ This needs a template File Edit! ]
4a. In vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml, set "skip_adjustments" to FALSE for "old-price"
4b. In vendor/magento/module-configurable-roduct/view/base/templates/product/price/final_price.phtml, set "skip_adjustments" to FALSE for "old-price"
Questions or comments
Please check if all type of products are correct.
I have did some checking, but i can understand that i missed a setup 😸
Contribution checklist (*)
Has connection with