yf_shop__format_price user module

Fileplugins/shop/modules/shop/yf_shop__format_price.class.php
Usemodule('shop__format_price'), URL ?object=shop__format_price

Public properties

PropertyDefaultDescription
None declared in this class.

Public methods 1

None without a leading underscore.

Methods starting with _ hooks and helpers; not routable as page actions

_format_price

public function _format_price($price = 0)
    public function _format_price($price = 0)
    {
        $price = number_format($price, 2, '.', ' ');
        if (module('shop')->CURRENCY == '$') {
            return module('shop')->CURRENCY . ' ' . $price;
        }
        return $price . ' ' . module('shop')->CURRENCY;
    }