reactioncommerce/example-storefront

Problem on variant price when changing the currency

samkonix opened this issue · 1 comments

Type: minor

Describe the bug
May be a reaction-admin bug.
I create a product with somes variants in $ currency.
If I want to chang the currency to € in reaction-admin, I have a storefront issue in variant price

To Reproduce
Steps to reproduce the behavior:

  1. Go to reaction-admin, create a product in $ currency
  2. change the currency to €
  3. try to display the product in storefront
  4. See error "Unhandled Runtime Error
    Error: Failed to load static props"

Expected behavior
Don't store currency in price ?

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Kubuntu 20.04
  • Browser Chrome
  • Version : 83.0.4103.116 (Build officiel) (64 bits)

Additional context
Custom log in VariantItem.js render() function :
null = priceByCurrencyCode(EUR, [{"compareAtPrice":null,"price":null,"currency":{"code":"USD"},"displayPrice":"$23.70"}])

It seem to be a cache problem.

If I update the price in admin, It will not change in the frontend GraphQL query result, like the currency.

If I add a variant in my product in admin, everything work again in frontend, price and currency are ok in the graphQL query result. So currency shop and currency variant is matching and the result of priceByCurrencyCode function is ok