Skip to content

Convert MSRP currency of configurable product options #27446

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

Conversation

ashokadewit
Copy link
Contributor

@ashokadewit ashokadewit commented Mar 26, 2020

Description

The MSRP of configurable products is updated in Javascript when an option is chosen. Javascript uses an object with prices of the options. The prices in this object are converted to the chosen currency. MSRP prices however were not converted, leading to the price being displayed in a wrong currency.

Manual testing scenarios

  1. Enable MAP (Configuration > Sales > Sales > Minimum Advertised Price > Enable MAP).
  2. Enable multiple currencies (Configuration > General > Currency Setup > Allowed Currencies)
  3. Create a configurable product with options that have an MSRP
  4. Go to the frontend and choose a currency that is not the base currency
  5. View the product on the frontend a choose an option.

Expected result: The MSRP is converted to the chosen currency
Actual result: The MSRP is not converted but it is labeled as the chosen currency

Screenshot from 2020-03-26 11-13-38

Note that the MSRP is configured in euro but displayed in dollars with the euro amount.

After applying the change the MSRP is converted:

Screenshot from 2020-03-26 12-52-14

Rates in table directory_currency_rate:

Screenshot from 2020-03-26 12-57-40

Resolved issues:

  1. resolves [Issue] Convert MSRP currency of configurable product options #29603: Convert MSRP currency of configurable product options

The MSRP of configurable products is updated in Javascript when an
option is chosen. Javascript uses an object with prices of the options.
The prices in this object are converted to the chosen currency. MSRP
prices however were not converted, leading to the price being displayed
in a wrong currency.
@m2-assistant
Copy link

m2-assistant bot commented Mar 26, 2020

Hi @ashokadewit. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sidolov sidolov added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Aug 17, 2020
@sidolov
Copy link
Contributor

sidolov commented Aug 17, 2020

@magento create issue

Copy link
Contributor

@sidolov sidolov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashokadewit could you please cover changes with the automated tests?

@ghost ghost assigned sidolov Aug 20, 2020
@engcom-Echo engcom-Echo self-assigned this Sep 9, 2020
@engcom-Echo
Copy link
Contributor

I will take care of test coverage.

@engcom-Echo engcom-Echo requested a review from sidolov September 9, 2020 14:32
@engcom-Echo
Copy link
Contributor

@magento run all tests

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-8174 has been created to process this Pull Request
✳️ @sidolov, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@magento-engcom-team
Copy link
Contributor

@ashokadewit thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@engcom-Echo engcom-Echo added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Sep 10, 2020
@engcom-Alfa engcom-Alfa self-assigned this Sep 10, 2020
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

  1. Enable MAP (Configuration > Sales > Sales > Minimum Advertised Price > Enable MAP).
  2. Enable multiple currencies (Configuration > General > Currency Setup > Allowed Currencies)
  3. Create a configurable product with options that have an MSRP
  4. Go to the frontend and choose a currency that is not the base currency
  5. View the product on the frontend a choose an option.

Before: ✖️ The MSRP is not converted but it is labeled as the chosen currency

2020-09-10_13-59

After: ✔️ The MSRP is converted to the chosen currency

2020-09-10_13-55

@engcom-Alfa engcom-Alfa added the QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope label Sep 10, 2020
@engcom-Echo engcom-Echo force-pushed the feature/convert-configuable-product-msrp branch from abf7ce9 to d07e0a9 Compare September 10, 2020 11:25
@engcom-Echo
Copy link
Contributor

@magento run all tests

@m2-assistant
Copy link

m2-assistant bot commented Sep 14, 2020

Hi @ashokadewit, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: ConfigurableProduct Component: Msrp Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] Convert MSRP currency of configurable product options
5 participants