ibexa

Path

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.

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.