How to Format Currency with Alpine JS
This uses the plugin Alpine JS x-money which allows you to take a value such as 1999 and turn it into a formatted, localized currency such as £19.99.
It also works with Shopify through the .shopify
modifier which will read the global Shopify object set on the window via window.Shopify
.