magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

magento 2.4.3-p1 - catalog price rule and product custom option price bug when convert currency

Open maconeto opened this issue 2 years ago • 18 comments

Preconditions (*)

  1. Magento version 2.4.3-p1
  2. PHP 7.4

Steps to reproduce (*)

  1. Setup fresh Magento website with 1 website, 1 store and 2 store views. Base currency EUR, first store view has display currency = EUR, second store view has display currency = NOK. Setup currency rate 1 EUR = 10 NOK
  2. Create simple product with price = 100 EUR, add custom option of type checkbox for that product with price = fixed price 10 EUR.
  3. Create catalog price rule for customer group General, discount set as apply to percentage to orginal price 15%
  4. Create new customer account of group general, login to checkout price on NOK store view

Expected result (*)

  1. custom option price = 85 NOK (8.5 EUR x 10) after discount

Actual result (*)

  1. custom option price = 850 NOK (100 times) --> look like currency is convert twice.

  • Severity: S0

maconeto avatar Mar 01 '22 19:03 maconeto

Hi @maconeto. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Mar 01 '22 19:03 m2-assistant[bot]

Hi @engcom-Delta. 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: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - 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.

m2-assistant[bot] avatar Mar 02 '22 09:03 m2-assistant[bot]

Hi @maconeto Thank you for reporting the issue. We tried to reproduce the issue on Magento 2.4-develop branch but the issue is not reproducible.

  1. Setup fresh Magento website with 1 website, 1 store and 2 store views. Base currency EUR, first store view has display currency = EUR, second store view has display currency = NOK. Setup currency rate 1 EUR = 10 NOK
  2. Create simple product with price = 100 EUR, add custom option of type checkbox for that product with price = fixed price 10 EUR.
  3. Create catalog price rule for customer group General, discount set as apply to percentage to orginal price 15%
  4. Create new customer account of group general, login to checkout price on NOK store view

Can you please elaborate the step 2 (add custom option of type checkbox for that product with price = fixed price 10 EUR.) what is the use of custom option of type checkbox because we have checked the issue with both custom and without custom option but did not found any changes as shown in screenshot ticket1

Please let me know if this is exactly what your issue was or if there is some more configuration required from my end. Will update accordingly.

thanks

engcom-Delta avatar Mar 07 '22 10:03 engcom-Delta

Thank you for your reply. Please check my screenshots below, it is easier to see it in product page

on store view 1 - the custom option price is 8.50 EUR [image: image.png]

But when switching to store 2, the price is now 850 NOK. It should have been 85 NOK only (8.5 x 10)

[image: image.png]

To elaborate 2: when creating product in admin, I added a custom option of type checkbox and give it fixed price = 10 EUR. On product page, this custom price 10 EUR should be 8.5 EUR on store view 1 and 85 NOK on store view 2, but it is converted like 2 times and become 850 NOK on store view 2 which is wrong.

I don't know why you get 830 NOK when adding product to cart because the 15% discount of 100 should not result to that total . Anyway, we don't need to add item to cart, just switch the store and look at the price of the custom option after switch to a different currency

On Mon, 7 Mar 2022 at 17:13, Penchalaiah K @.***> wrote:

Hi @maconeto https://github.com/maconeto Thank you for reporting the issue. We tried to reproduce the issue on Magento 2.4-develop branch but the issue is not reproducible.

  1. Setup fresh Magento website with 1 website, 1 store and 2 store views. Base currency EUR, first store view has display currency = EUR, second store view has display currency = NOK. Setup currency rate 1 EUR = 10 NOK
  2. Create simple product with price = 100 EUR, add custom option of type checkbox for that product with price = fixed price 10 EUR.
  3. Create catalog price rule for customer group General, discount set as apply to percentage to orginal price 15%
  4. Create new customer account of group general, login to checkout price on NOK store view

Can you please elaborate the step 2 (add custom option of type checkbox for that product with price = fixed price 10 EUR.) what is the use of custom option of type checkbox because we have checked the issue with both custom and without custom option but did not found any changes as shown in screenshot [image: ticket1] https://user-images.githubusercontent.com/51681379/157000761-7ea18b82-de47-4ce1-b1de-9de3235914bb.png

Please let me know if this is exactly what your issue was or if there is some more configuration required from my end. Will update accordingly.

thanks

— Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/35154#issuecomment-1060429250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMJGH4OOPM4M553JQXKFMTU6XJDHANCNFSM5PU7ERZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Best Regards,

Anthony Nguyen

Magento Certified Developer http://www.magentocommerce.com/certification/directory/dev/248615/

maconeto avatar Mar 07 '22 12:03 maconeto

Hi @maconeto , Thank you for quick reply , screenshots are missing in your reply . Please share the screenshots.

engcom-Delta avatar Mar 10 '22 10:03 engcom-Delta

Sure. I uploaded screenshots to 3rd party services :

1.on store view 1 - the custom option price is 8.50 EUR

https://imgur.com/pOmnG1y

  1. after switching to store 2, the price is now 850 NOK. It should have been 85 NOK only (8.5 x 10)

https://imgur.com/yInRNlk

On Thu, 10 Mar 2022 at 17:02, Penchalaiah K @.***> wrote:

Hi @maconeto https://github.com/maconeto , Thank you for quick reply , screenshots are missing in your reply . Please share the screenshots.

— Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/35154#issuecomment-1063877309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMJGH3UQX73YAGOJE6N5YDU7HCEJANCNFSM5PU7ERZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Best Regards,

Anthony Nguyen

Magento Certified Developer http://www.magentocommerce.com/certification/directory/dev/248615/

maconeto avatar Mar 10 '22 10:03 maconeto

@magento give me 2.4-develop instance

pemann avatar Mar 10 '22 12:03 pemann

Hi @pemann. Thank you for your request. I'm working on Magento instance for you.

Hi @pemann, here is your Magento Instance: https://8218d02bc04a339776b671cc6a9a3577.instances.magento-community.engineering Admin access: https://8218d02bc04a339776b671cc6a9a3577.instances.magento-community.engineering/admin_4d37 Login: 4aa2891a Password: 07ad2d9d6923

Hi @maconeto , We have double checked this issue and confirming it . Pre-Conditions: Install clean Magento 2.4-develop PHP 7.4

Manual Steps Executed:

  1. Login into the Admin
  2. Setup fresh Magento website with 1 website, 1 store and 2 store views
  3. Set currency for first store view; currency = EUR
  4. Set currency for first store view; currency = NOK
  5. Setup currency rate 1 EUR = 10 NOK
  6. Create simple product with price = 100 EUR, add custom option of type checkbox for that product with price = fixed price 10 EUR
  7. Create catalog price rule for customer group General, discount set as apply to percentage to orginal price 15%
  8. Create new customer account of group general, login to checkout price on NOK store view

Actual Result: Custom option price = 850 NOK (100 times) >> look like currency is converting twice. Screenshot from 2022-03-23 17-36-21

Screenshot from 2022-03-23 17-35-58

Expected Result: Custom option price = 85 NOK (8.5 EUR x 10) after discount

Thanks

engcom-Delta avatar Mar 23 '22 15:03 engcom-Delta

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-2688 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Mar 23 '22 16:03 github-jira-sync-bot

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar Mar 23 '22 16:03 github-jira-sync-bot

:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

m2-assistant[bot] avatar Mar 23 '22 16:03 m2-assistant[bot]

Hello @engcom-Delta,

Thanks for confirming the issue!

Can you please check the checkout page as well for NOK storeview for the amount. It will help us in prioritise the issue.

Thanks

engcom-Hotel avatar Apr 12 '22 11:04 engcom-Hotel

Hi @engcom-Delta. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - 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!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

m2-assistant[bot] avatar Apr 13 '22 00:04 m2-assistant[bot]

Hi @maconeto , We have double checked this issue on Magento 2.4 Develop, issue is producible.

Expected results Expected: Custom option should be 85 . 8.5 Euro * 10 times=85 Add to cart should be 850+85=935.

Actual Results Custom option price showing as 850 ,on adding to cart 850+850 =1700. It has become 1700 NOK. Screenshot 1: Screenshot 2022-04-20 at 7 20 51 PM Screenshot 2 without custom option : Screenshot 2022-04-20 at 7 19 31 PM

screenshot for Euro currency: Screenshot 2022-04-20 at 7 18 19 PM

Hence , issue has been confirmed.

engcom-Delta avatar Apr 20 '22 14:04 engcom-Delta

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-2688

github-jira-sync-bot avatar Apr 20 '22 14:04 github-jira-sync-bot

Hi @maconeto Thanks for your contribution here. Internal team has already picked up the ticket and working on it. We have the above auto-generated ticket AC-2688 to work on it. This fix will be the part of Magento release version 2.4.5. Thanks

engcom-Alfa avatar May 12 '22 14:05 engcom-Alfa

Hello,

As I can see this issue got fixed in the scope of the internal Jira ticket AC-2688 by the internal team Related commits: https://github.com/magento/magento2/search?q=AC-2688&type=commits

Based on the Jira ticket, the target version is 2.4.6.

Thanks

engcom-Hotel avatar Dec 15 '22 05:12 engcom-Hotel