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: add replace to remove comma from formatting #4910

Merged
merged 4 commits into from
Jan 11, 2019

Conversation

kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented Jan 9, 2019

Resolves #4900
Impact: minor
Type: bugfix

Issue

Price ranges that included a number above 1000 would show up as NAN in the admin Grid. This is due to the currency being formatted twice, which in turn adds double commas into the string, which breaks the display.

Solution

Use our "new" getProductPriceRange to calculate the price range based off of min and max numbers, instead of the price range string.

Breaking changes

None

Testing

  1. Change the price of all of a products variants to anything over $1,000 (anything that will show a comma).
  2. See that the price range correctly displays on the Grid when you are logged in as an admin.
  3. See that the price is not broken on the Grid AND PDP when not logged in as an admin.

Copy link
Contributor

@jeffcorpuz jeffcorpuz left a comment

Choose a reason for hiding this comment

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

looks good to me!

@spencern spencern merged commit 2d3d1c7 into develop Jan 11, 2019
@spencern spencern deleted the fix-kieckhafer-4900-currencyNANissue branch January 11, 2019 17:49
@spencern spencern mentioned this pull request Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants