public function testGetPriceInActCurrency() { $oCurrency = $this->getConfig()->getActShopCurrencyObject(); $dPrice = 99.66; $this->assertEquals($dPrice * $oCurrency->rate, oxPrice::getPriceInActCurrency($dPrice)); }
/** * Returns TRUE if ( current basket products sum - total discount - voucher discount ) > 0 * * @return bool */ public function isBelowMinOrderPrice() { $blIsBelowMinOrderPrice = false; $sConfValue = $this->getConfig()->getConfigParam('iMinOrderPrice'); if (is_numeric($sConfValue) && $this->getProductsCount()) { $dMinOrderPrice = oxPrice::getPriceInActCurrency((int) $sConfValue); $dNotDiscountedProductPrice = 0; if ($oPrice = $this->getNotDiscountProductsPrice()) { $dNotDiscountedProductPrice = $oPrice->getBruttoSum(); } $blIsBelowMinOrderPrice = $dMinOrderPrice > $this->getDiscountedProductsBruttoPrice() + $dNotDiscountedProductPrice; } return $blIsBelowMinOrderPrice; }
/** * Template variable getter. Returns formatted min order price value * * @deprecated in v4.8/5.1 on 2013-10-14; use oxBasket method * * @return string */ public function getMinOrderPrice() { if ($this->_sMinOrderPrice === null && $this->isLowOrderPrice()) { $dMinOrderPrice = oxPrice::getPriceInActCurrency($this->getConfig()->getConfigParam('iMinOrderPrice')); $this->_sMinOrderPrice = oxRegistry::getLang()->formatCurrency($dMinOrderPrice); } return $this->_sMinOrderPrice; }
/** * Returns min order price value * * @return decimal */ public function getMinOrderPrice() { return oxPrice::getPriceInActCurrency($this->getConfig()->getConfigParam('iMinOrderPrice')); }