reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

Prices should not be converted in admin view #3821

Closed prinzdezibel closed 6 years ago

prinzdezibel commented 6 years ago

Expected behavior

The shop base currency should be honored for all prices shown in admin view.

Actual behavior

If the shop's base currency is set to EUR and the admin does add a new product, the product's price get converted immediately from USD->EUR, because shop assumes that the entered value is USD.

EDIT: Strangely, the above stated does not happen reproducible

EDIT 2: Is happens reliably, if the currency selector in the nav bar doesn't match the shop base currency.

But the following seems to happen always: Additionally it's not possible to enter the in the shop base locale, e.g. with a comma as separator for EUR currency.

Steps to reproduce the behavior

Versions

Node: 8.2.1 NPM: 5.3.0 Meteor Node: 8.9.4 Meteor NPM: 5.6.0 Reaction CLI: 0.26.4 Reaction: 1.8.0 Reaction branch: release-1.8.0 Docker: 17.03.1-ce

Analysis

It could have to do with this PR: https://github.com/reactioncommerce/reaction/commit/a9937023c911334d7cae5d6a84252666bd802b99

implicit_conversion

prinzdezibel commented 6 years ago

Entering formatted values in shop's base currency is not possible: locale_formatting

Akarshit commented 6 years ago

Will fix this on monday.

Akarshit commented 6 years ago

The current idea is to use the NumericInput for the "currencyInput" component. Working on it, will be fixed today.

Akarshit commented 6 years ago

I have tested #3893 and once it gets merged we can reuse it's component(with a little modification) to fix the issue.

Akarshit commented 6 years ago

~This will be done today.~ [EDIT] there are some issues when the shop's currency is changed, that need to be fixed. Working on that.