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

Different prices with the storefront API #2388

Closed
showcase-books opened this issue Jul 31, 2024 · 3 comments
Closed

Different prices with the storefront API #2388

showcase-books opened this issue Jul 31, 2024 · 3 comments

Comments

@showcase-books
Copy link

showcase-books commented Jul 31, 2024

What is the location of your example repository?

No response

Which package or tool is having this issue?

Storefront API

What version of that package or tool are you using?

2024-07

What version of Remix are you using?

No response

Steps to Reproduce

Running the following curl returns a price of €24.95 while the checkout page returns €23.95 (checkout_page)

curl -i -X POST \
https://8d6bcd-6c.myshopify.com/api/2024-07/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Storefront-Access-Token: 71113a514ab40c6cbc451e20a9df66f3' \
-d '{"query": "query getProductVariantPrice($id: ID!) @inContext(country: FR) { node(id: $id) { ... on ProductVariant { title price { amount currencyCode } } } }","variables": {"id": "gid://shopify/ProductVariant/48782992769367"}}'

Expected Behavior

Return the correct price (€23.95)

Actual Behavior

Return a higher price (€24.95). The issue is only for EUR currency countries

@frandiox
Copy link
Contributor

frandiox commented Aug 1, 2024

Hi 👋
This might be related to the product max / min price for every variant. If you request that in your query, you get: "product":{"priceRange":{"maxVariantPrice":{"amount":"24.95"},"minVariantPrice":{"amount":"24.95"} so that probably the variants are limited to 24.95.

Query:

'{"query": "query getProductVariantPrice($id: ID!) @inContext(country: FR) { node(id: $id) { ... on ProductVariant { title price { amount currencyCode } product { priceRange { maxVariantPrice { amount currencyCode } minVariantPrice { amount currencyCode } } } } } }","variables": {"id": "gid://shopify/ProductVariant/48782992769367"}}'

@showcase-books
Copy link
Author

Hi @frandiox

Many thanks for your answer. I ran the query and indeed I got the min / max equal to 24.95. I am not sure how to fix this though. The base price is in pound (£20) and the conversion is done automatically.

Thanks for the support

{"data":{"node":{"title":"Louie Mae Chu","price":{"amount":"24.95","currencyCode":"EUR"},"product":{"priceRange":{"maxVariantPrice":{"amount":"24.95","currencyCode":"EUR"},"minVariantPrice":{"amount":"24.95","currencyCode":"EUR"}}}}},"extensions":{"context":{"country":"FR","language":"EN"}}}%

@juanpprieto
Copy link
Contributor

Hi @showcase-books,

For Storefront API related issues please report with the team at:

https://github.com/Shopify/storefront-api-feedback/discussions

Closing

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

No branches or pull requests

3 participants