Path / documentation / ez publish / technical manual / 3.10 / reference / modules / shop / fetch functions / preferred_currency_code

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Fetches the current user's preferred currency.


fetch( 'shop', 'preferred_currency_code' )


A three-character currency code or FALSE.


This function fetches the preferred currency of the current user and returns a three-character currency code. A value for the preferred currency is taken from (sorted by priority ascending)

  • shop.ini
  • user's preferences
  • session variable

The function will return FALSE if the preferred currency is not specified.


Example 1

{def $currency = fetch( 'shop', 'preferred_currency_code' )}
{if $currency}
    Your preferred currency is {$currency}.
    You should choose the preferred currency.

Outputs the currency code of the current user's preferred currency.

Svitlana Shatokhina (05/05/2006 9:41 am)

Svitlana Shatokhina (05/05/2006 10:44 am)


There are no comments.