Hi Shopify team,
I’m working on integrating Markets logic into an app that generates custom sales orders. These orders may include product variants, custom products, discounts, and additional charges.
To display correct pricing, I rely on context that includes:
- Customer’s country
- Retail location ID
- Company location ID (optional)
From what I understand, Shopify Markets configurations can reflect on Product
and ProductVariant
’s contextualPricing
, and that’s working well.
However, I also need to determine the currencyCode
for discounts and charges that are not associated with any products. This means I need to resolve the currency from the context, but without a product or product variant ID.
The recommended approach is to use marketsResolvedValues
(as noted here). However, this only accepts country
, while contextualPricing
also supports locationId
and companyLocationId
.
Question:
How can I resolve the currencyCode
using country + locationId + companyLocationId
, without querying a product via contextualPricing
?