Closed
Description
Preconditions (*)
- Magento 2.4-develop
- PHP 7.2
Steps to reproduce (*)
- Add custom option of type Field, Radio, Checkbox or Date to a product
- Set price to be of type percent
- Add another currency to a shop
- On a product page change a currency to different from shops base currency so that magento converts the prices.
Expected result (*)
- Price of custom option should be a percent of products price but in current currency.
Actual result (*)
- Percent price is converted twice.
Magento\Catalog\Pricing\Price\CustomOptionPriceCalculator::getOptionPriceByPriceCode():
in case of a percent, is getting price from product's PriceInfo which is converted to a selected currency.
However then on a block levels there different methods for different types of custom options, that end up in CustomOptionPrice::getCustomAmount() that does convertAndRound on already converted amount in case of percent custom option price.
Additional information
-detailed steps with screens #26432 (comment)
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchAffects critical data or functionality and forces users to employ a workaround.Has been reviewed and prioritized during Triage with Product Managers
Type
Projects
Status
Done