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

preferred_currency_code

Summary

Fetches the current user's preferred currency.

Usage

fetch( 'shop', 'preferred_currency_code' )

Returns

A three-character currency code or FALSE.

Description

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.

Examples

Example 1

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

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)


Comments

There are no comments.