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

How to handle International pricing with shopify-buy (deprecated presentmentPrices) #886

Open
moreguppy opened this issue Mar 31, 2022 · 2 comments

Comments

@moreguppy
Copy link

Hello Shopify—

Myself (and I think many others) are a bit lost with the deprecated presentmentPrices and the move to the International pricing API

Are there methods in the shopify-buy sdk to handle this now?

For example, when initialising the client do we need to set the currency? Or do we need to somehow set the currency per fetching method?

  client.collection
    .fetchWithProducts(collectionId, { 
      productsFirst: 120,
      currency: 'USD' // Is there an option here we need to pass in order to get the right price? 
    })
    .then((collection) => {
        // do something
    });

Or do we need to use the graphql API instead and move away from the the buy sdk?

Thanks

@sblackstone
Copy link

I am also looking for guidance on this issue - can we issue the raw graphql query for creating the cart and then use the rest of the API as is?

@sjelfull
Copy link

You have to use raw GraphQL queries for all calls, since things like line items won't be fetched in the correct context without continuing to specify the inContext directive.

Related to #884

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