Skip to content

Currency

The currency object represents information about currency in the storefront.

classDiagram
  direction LR
  class Currency{
    int id
    string name
    string shortName
    string code
    bool isDefault
    ?string symbol
    Metafields metafields
  }

Properties

Attribute name Type Description
id int The unique identifier of the currency.
name string The localized name of the currency.
shortName string The localized short name of the currency.
code string The localized code (ISO 4217) of the currency.
isDefault bool Whether the currency is set as default in shop
symbol null|string Currency symbol.
metafields Metafields Reference to the Metafields object that provides access to the namespaced containers for key - value pairs of data.

Examples

id property

{{ currency.id }}
1

name property

{{ currency.name }}
example name

shortName property

{{ currency.shortName }}
short name

code property

{{ currency.code }}
USD

isDefault property

{{ currency.isDefault }}
true

symbol property

{{ currency.symbol }}
$

metafields property

value: {{ currency.metafields.someNamespaceName.key }}
value: example-value-4