The tutorial simply harcodes a $
in its error message, but that of course won’t work for merchants selling in multiple markets, or those using a non-dollar default currency.
The function provides access to the cart’s currency code, but we’d like to present the customer with a properly formatted currency amount, including correct currency symbol, separators, and decimal precision.
How are folks going about achieving this, currently? Rolling your own version of Intl.NumberFormat
inside your function logic? Also curious what Shopifolk recommend here.