View Issue Details

IDProjectCategoryView StatusLast Update
0001349OXID eShop (all versions)1.03. Basket, checkout processpublic2012-12-07 15:17
Reporterseifert_eduard Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.1.5 revision 21618 
Fixed in Version4.2.0 revision 23610 
Summary0001349: oxbasket.php > getPaymentCosts() returns non-formatted brutto price
DescriptionIf 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 }]


TagsPayment
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

rimvydas_paskevicius

2009-10-01 14:05

reporter   ~0001862

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()

philipp_grashoff

2009-10-01 14:23

reporter   ~0001863

Wondering if there isnt a smarty modifier equivalent to PHP function number_format which could be used for formatting numbers correctly for displaying?

rimvydas_paskevicius

2009-10-01 16:19

reporter   ~0001867

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.