function currencyCode($collection = false) { if (is_string($collection) and $collection != '') { $currencyCode = $collection; } else { if ($collection instanceof eZProductCollection === false) { $collection = eZProductCollection::fetch($this->attribute('productcollection_id')); } $currencyCode = $collection->attribute('currency_code'); } // Backwards compability for orders done with the price datatype. if ($currencyCode == '') { $currencyCode = eZOrder::fetchLocaleCurrencyCode(); } return $currencyCode; }