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.

Selling Plan Price Adjustments Not Reflecting Correct Currency Code

Selling Plan Price Adjustments Not Reflecting Correct Currency Code

felixmulya
Visitor
1 0 1

I am having trouble getting the correct currency code for selling plan prices using the Shopify GraphQL API. Even though my store is set to TWD (New Taiwan Dollar), the prices are still showing in USD (US Dollar).

Can you help me understand why the currency code is still in USD and how I can make it show TWD?

Any help or guidance on this issue would be greatly appreciated.

Thank you for your assistance!


 

query allProducts @inContext(country: TW) {
  product(id: "gid://shopify/Product/#####") {
    id
    title
    handle
    tags
    sellingPlanGroups(first: 20) {
      edges {
        node {
          name
          sellingPlans(first: 20) {
            edges {
              node {
                id
                name
                priceAdjustments {
                  adjustmentValue {
                    ... on SellingPlanFixedPriceAdjustment {
                      price {
                        amount
                        currencyCode
                      }
                    }
                    ... on SellingPlanPercentagePriceAdjustment {
                      adjustmentPercentage
                    }
                  }
                }
                checkoutCharge {
                  value {
                    ... on MoneyV2 {
                      amount
                      currencyCode
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    variants(first: 20) {
      edges {
        node {
          id
          title
          quantityAvailable
          priceV2 {
            amount
            currencyCode
          }
          sku
          barcode
        }
      }
    }
  }
}
Reply 1 (1)

HJGreen
Shopify Partner
1 0 0

I am experiencing the same problem. I have a store with two markets and would like to display the Selling Plan's checkoutCharge on the product page in the customer's local currency. However it is always returned from the API in the store's default currency despite using the `@inContext` directive.

The product's pricing is returned in the customer's local currency, why not the Selling Plan charges?