Skip to content
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

Fix of invalid price for integer currencies when amount less than group size #16590

Merged
merged 1 commit into from
Jul 13, 2018
Merged

Fix of invalid price for integer currencies when amount less than group size #16590

merged 1 commit into from
Jul 13, 2018

Conversation

vkublytskyi
Copy link

Description

This is backported #16588 and related to #15909.

After correct fixes in #15909 (#15540) client-side formatting starts corrupt prices in currencies without minor units if price amount is less then number group size (usually equal to 3 numbers).

Fixed Issues (if relevant)

  1. Wrong price amount on product page #11717: Wrong price amount on a product page

Manual testing scenarios

STR:

  1. Install Magento
  2. Set USD as a base currency
  3. Set JPY as display currency (it also should be enabled as available currency)
  4. Add product with price 0.01 USD
  5. Add currency rate as 110 JPY for 1 USD
  6. Open product page

AC: price 0,001 is displayed (wrongly added 0 to have group separator visible)

ER: price 1 is displayed (no decimal part, no preceding 0)

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @vkublytskyi. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@orlangur orlangur changed the title Fix of invalid price for integer currencies when amount less than group size [Backport] Fix of invalid price for integer currencies when amount less than group size Jul 6, 2018
@orlangur orlangur self-assigned this Jul 6, 2018
@orlangur orlangur removed the backport label Jul 6, 2018
@orlangur orlangur changed the title [Backport] Fix of invalid price for integer currencies when amount less than group size Fix of invalid price for integer currencies when amount less than group size Jul 6, 2018
@orlangur
Copy link
Contributor

orlangur commented Jul 6, 2018

@vkublytskyi please pay attention that 2.2.x is current release line.

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-2213 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @vkublytskyi. Thank you for your contribution.
We will aim to release these changes as part of 2.2.6.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants