-
Notifications
You must be signed in to change notification settings - Fork 291
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
hydrogen-react: Cart currency does not update after changing countryIsoCode of ShopifyProvider #1361
Comments
I am seeing this issue as well.. I am not using Hydrogen, but its the same issue using the graphql API (using Nuxt3 with the Shopify Graphql API).. This is an internal API issue I am pretty sure. The On top of what @maximilianschmitt mentioned, Hydrogen will break when you change the currency to a new country code and select any new variant of a product. The page reads |
The bug can be reproduced on the demo store without any change:
Any multi-currency custom storefront is affected. |
Can confirm, same thing happening with our store, this is having a huge impact on all multi-currency stores. |
This was an storefront-api mutation issue - Should be solved now |
I see that it now works for your demo. But it still doesn't work for us (haven't changed anything in the codebase). Please see here: https://contrebande.co |
@contrebande-labs I've added an item to cart and switching between the available currencies and I am seeing the prices are changing to the expected currencies for the product list and cart items using the link you have provided |
@wizardlyhel Thanks for your help. It still didn't work for me until I cleared my cookies. Is it possible that it could be the case? Old carts will still have the problem? |
@wizardlyhel @contrebande-labs can confirm that the issue is still impacting sessions that were set during this window, so the only way to get those working is to clear the cart cookie, new sessions were indeed fixed though. |
@wizardlyhel @contrebande-labs Can You guys share any github code or process how this currency changing demo store was developed in hydrogen? |
What is the location of your example repository?
No response
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
@shopify/[email protected]
What version of Remix are you using?
No response
Steps to Reproduce
I'm using hydrogen-react to manage a storefront that has multiple currencies setup. The app is wrapped like so:
Starting with
countryIsoCode="SE"
, I'm following these steps:1. I add an item to the cart and cartCreate gets called to create a cart with country: SE
Request:
Response:
I change
countryIsoCode
from"SE"
to"DK"
, so cartBuyerIdentityUpdate gets called to update the cart with country: DKRequest:
Response:
Expected Behavior
After calling cartBuyerIdentityUpdate with a new country, I would expect the cart to display all line items and totals/subtotals in the currency of the new country.
Actual Behavior
The cart displays all line items and totals/subtotals in the currency with which the cart was originally created.
The text was updated successfully, but these errors were encountered: