public static function price_for_display($price)
    {
        $currency = ShopConfigExtension::get_site_currency();
        $field = DBMoney::create_field(DBMoney::class, 0, 'Price');
        $field->setAmount($price);
        $field->setCurrency($currency);
        return $field;
    }
public static function price_for_display($price)
    {
        $currency = ShopConfigExtension::get_site_currency();
        $field = DBMoney::create_field(DBMoney::class, 0, 'Price');
        $field->setAmount($price);
        $field->setCurrency($currency);
        return $field;
    }
public static function price_for_display ( $ price ) { $ currency = ShopConfigExtension :: get_site_currency ( ) ; $ field = DBMoney :: create_field ( DBMoney :: class , 0 , 'Price' ) ; $ field -> setAmount ( $ price ) ; $ field -> setCurrency ( $ currency ) ; return $ field ; }
Convert a numeric price to the shop currency

@param  mixed $price the price to convert
@return DBMoney the price wrapped in a Money DBField to be used for templates or similar
Convert a numeric price to the shop currency