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.

How do you create discount functionality that supports multiple currencies?

Solved

How do you create discount functionality that supports multiple currencies?

Hirano_00
Shopify Partner
86 10 14

I have created a discount that follows the documentation and gives 10% off for orders with a minimum subtotal of over 100 USD. This works.

https://shopify.dev/docs/apps/selling-strategies/discounts/discount-function-examples/order-minimum-...

 

Next, change the store currency from USD to JPY.

If the exchange rate is 150 JPY/USD, the minimum subtotal must be 10% off for orders exceeding 15,000 JPY.

However, the 10% discount will be applied to orders with a minimum subtotal of more than 100 JPY.

 

Do I have to do currency conversion in the Discount Function logic to create a multi-currency discount?

Accepted Solution (1)

tobebuilds
Shopify Partner
581 42 157

This is an accepted solution.

The `Input.presentmentCurrencyRate` is a ratio from the store's currency to the local currency.

 

Line item price / presentmentCurrencyRate = Line item price in store currency

15,000 JPY * presentmentCurrencyRate = Amount in the customer's currency

Founder, Regios Discounts app (4.8 stars, 94 reviews)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
- Often imitated, never duplicated

View solution in original post

Reply 1 (1)

tobebuilds
Shopify Partner
581 42 157

This is an accepted solution.

The `Input.presentmentCurrencyRate` is a ratio from the store's currency to the local currency.

 

Line item price / presentmentCurrencyRate = Line item price in store currency

15,000 JPY * presentmentCurrencyRate = Amount in the customer's currency

Founder, Regios Discounts app (4.8 stars, 94 reviews)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
- Often imitated, never duplicated