View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001349 | OXID eShop (all versions) | 1.03. Basket, checkout process | public | 2009-09-28 22:37 | 2012-12-07 15:17 |
Reporter | seifert_eduard | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.1.5 revision 21618 | ||||
Fixed in Version | 4.2.0 revision 23610 | ||||
Summary | 0001349: oxbasket.php > getPaymentCosts() returns non-formatted brutto price | ||||
Description | If you want to display the payment costs gross sum in basket view it will only show e.g. 7.5 € and not 7.50 €. > oxbasket.php /** * Returns payment costs * * @return double | bool */ public function getPaymentCosts() { // this return $this->getCosts( 'oxpayment' )->getBruttoPrice(); // must be this ??? return oxLang::getInstance()->formatCurrency( $this->getCosts( 'oxpayment' )->getBruttoPrice(), $this->getBasketCurrency() ); } > output e.g.: [{ $oxcmp_basket->getPaymentCosts() }] [{ $currency->sign }] | ||||
Tags | Payment | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
oxBasket::getPaymentCosts() cannot return formated value because return result is used for other calculations in oxBasket and tempalates. New method for returning formated payment cost was added oxBasket::getFPaymentCosts(). Also added method for returning formated wrapping price oxBasket::getFWrappingCosts() |
|
Wondering if there isnt a smarty modifier equivalent to PHP function number_format which could be used for formatting numbers correctly for displaying? |
|
There is oxid smarty modifier "oxnumberformat", where you can pass format string like "EUR@ 1.00@ ,@ .@ €@ 2" and get formated value. But these two new methods will make life easier. |