As a new version of the API release, Shopify Markets is going to undergo changes, and as per the changelog, so many things for markets is going to change.
So, can someone help to get an idea of how I can retrieve the price for the product?
You should give the Dev Assistant a try
I asked it and it produced the following query:
query {
product(id: "gid://shopify/Product/PRODUCT_ID") {
contextualPricing(context: {country: CA}) {
priceRange {
maxVariantPrice {
amount
currencyCode
}
minVariantPrice {
amount
currencyCode
}
}
}
}
}
Thanks Luke for this but if we consider scenario like this as per new market.
Market1: Uk, US
market2: UK, INDIA
Catalogs:
CatalogA: market1
CatalogB: market2
In this case what is the price of one product in UK. The above Query will not give exact price as in my both catalog if I am having different price then which price I will get?
If it works anything like it would on the storefront, I’m pretty certain Shopify automatically returns the cheapest price if a product exists in multiple catalogs.
Give it a test and try it
Thaks Luke
I have tried this, But if we consider above scenario.
My market1 and market2 having different domain and it shows me different prices for both the markets for same country.
Our API will give me any one price but in storefront based on the URL in same country having a different price.
Luke.
That thing helped me to identify that we will get lowest price from all catalogs. I want to understand which currecy code I will get.
Market1: Uk, US Currency: A
market2: UK, INDIA Currency: B
Catalogs:
CatalogA: market1 Currency: C
CatalogB: market2 Currency: D
So, As per this scenario I will receive price in which currency code(Is there any specific behaviour like price)?