Public Member Functions | |
__construct ($code, $rate=1) | |
setRate ($rate) | |
filter ($value) | |
Protected Attributes | |
$_rate | |
$_currency |
Definition at line 32 of file Filter.php.
__construct | ( | $ | code, | |
$ | rate = 1 | |||
) |
Definition at line 48 of file Filter.php.
00049 { 00050 $this->_currency = Mage::app()->getLocale()->currency($code); 00051 $this->_rate = $rate; 00052 }
filter | ( | $ | value | ) |
Filter value
double | $value |
Definition at line 70 of file Filter.php.
00071 { 00072 $value = Mage::app()->getLocale()->getNumber($value); 00073 $value = Mage::app()->getStore()->roundPrice($this->_rate*$value); 00074 //$value = round($value, 2); 00075 $value = sprintf("%f", $value); 00076 return $this->_currency->toCurrency($value); 00077 }
setRate | ( | $ | rate | ) |
$_currency [protected] |
Definition at line 46 of file Filter.php.
$_rate [protected] |
Definition at line 39 of file Filter.php.