Skip to content Loading
NN front page highlights - top row
5 products
Your cart
Your cart is empty
Have an account? Log in to check out faster.
Continue shopping Continue shopping
Cart total RM0.00
Product image Product information Quantity Product total
That's everything — and the source answers the rounding question precisely. In formatMoney: when DoublyGlobal.roundDecimals is on and you're not in shop currency, it truncates the decimals and stitches on DoublyGlobal.roundTo — that's your ".50" endings (42.77 → "42." + "50"). Which means I don't replicate anything: I call their formatMoney and get pixel-identical output, rounding rule and all. convert(amount, from, to) is confirmed clean passthrough math. One real trap the source exposed that my draft would've gotten wrong: variant switches. When someone clicks "4 Bags", Lit updates the price text in-place — my cached MYR base would go stale and I'd overwrite the new price with the old conversion. Fixed below by fingerprinting my own output: if an element's text isn't exactly what I last wrote, it's fresh MYR from the widget and gets re-parsed. The invariant holds because the widget only ever thinks in MYR. Paste this in layout/theme.liquid, right before
: