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.

currency

Summary

Fetches a currency object.

Usage

fetch( 'shop', 'currency',
       hash( 'code', code ) )

Parameters

NameTypeDescriptionRequired
code string The three-character code of the target currency. Yes.

Returns

An ezcurrencydata object or FALSE.

Description

This function fetches the currency specified by the "code" parameter and returns it as an ezcurrencydata object. The function will return FALSE if the specified currency is unavailable.

Examples

Example 1

{def $code = 'EUR'}
 
{def $currency = fetch( 'shop', 'currency',
                          hash( 'code', $code ) )}
 
{if $currency}
     The currency symbol for EUR is {$currency.symbol}. <br />
{/if}

Outputs the currency symbol that is used for the "EUR" currency if available.

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

Svitlana Shatokhina (11/01/2007 9:42 am)


Comments

There are no comments.