How to return a currency object in liquid

Topic summary

Goal: retrieve the currency symbol in Shopify Liquid when shop.currency returns only the ISO code (e.g., “USD”). Direct access via shop.currency.symbol does not work as expected.

Working approaches:

  • Parse shop.money_format to extract the symbol. Implemented both in JavaScript (substring from money_format) and in Liquid (capture shop.money_format, split at “{”, take the first segment).
  • Use cart.currency.symbol when a cart object is present.
  • Loop through shop.enabled_currencies and output currency.symbol for the one whose iso_code matches shop.currency (the store’s primary currency). This runs once if only one currency is enabled.

Caveats and limitations:

  • Symbols may differ from expectations by locale/Shopify data. Example: Egyptian Pound (EGP) can return “ج.م” instead of “LE”.
  • cart.currency.symbol depends on cart context and may not be suitable outside cart pages.
  • The documented Currency object appears inaccessible directly via shop.currency, prompting workarounds.

Status: No official fix confirmed. Community relies on Liquid/JS parsing or enabled_currencies iteration. Code snippets are central to the solutions. Unresolved edge cases remain for certain currencies/symbol variants.

Summarized with AI on December 23. AI used: gpt-5.

This is returning the wrong symbol for some countries.

Egyptian pound (EGP) will return “ج.م” instead of “LE”