Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Storefront api pricelist/markets

Solved

Storefront api pricelist/markets

jahnni
Tourist
4 1 0

Is there a way to specify a market (I mean shopify markets https://www.shopify.com/markets ) when querying the products with the storefront apis via js ?

I've tried something like

 

const client = ShopifyBuy.buildClient({
    domain: 'my-domain.myshopify.com',
    storefrontAccessToken: 'my-token',
    localization:'US'
});

const client = ShopifyBuy.buildClient({
    domain: 'my-domain.myshopify.com/en-US',
    storefrontAccessToken: 'my-token',
});

const client = ShopifyBuy.buildClient({
    domain: 'my-domain.myshopify.com/en-US',
    storefrontAccessToken: 'my-token',
    language: 'en-US'
});

 

 

but none of the above seems effective, when query for products 

 

client.product.fetch(productId).then((product) => {
  console.log(product);
});

 

 

i always get prices from the default market.

Accepted Solution (1)

jahnni
Tourist
4 1 0
Reply 1 (1)

jahnni
Tourist
4 1 0

This is an accepted solution.