function getBasePrice($dAmount = 1) { if ($this->dBasePriceCache) { return $this->dBasePriceCache; } else { return parent::getBasePrice(); } }
/** * Checks if discount applies for article * * @param oxArticle $oArticle article object * * @return bool */ public function isForArticle($oArticle) { // item discounts may only be applied for basket if ($this->oxdiscount__oxaddsumtype->value == 'itm') { return false; } if ($this->oxdiscount__oxamount->value || $this->oxdiscount__oxprice->value) { return false; } if ($this->oxdiscount__oxpriceto->value && $this->oxdiscount__oxpriceto->value < $oArticle->getBasePrice()) { return false; } if ($this->isGlobalDiscount()) { return true; } $sArticleId = $oArticle->getProductId(); if (!isset($this->_aHasArticleDiscounts[$sArticleId])) { $blResult = $this->_isArticleAssigned($oArticle) || $this->_isCategoriesAssigned($oArticle->getCategoryIds()); $this->_aHasArticleDiscounts[$sArticleId] = $blResult; } return $this->_aHasArticleDiscounts[$sArticleId]; }
/** * Test enable price load. * * @depends testDisablePriceLoad * * @param oxArticle $oArticle * * @return null */ public function testEnablePriceLoad(oxArticle $oArticle) { $oArticle->enablePriceLoad(); $this->assertNotNull($oArticle->getBasePrice()); }