Esempio n. 1
0
 /**
  * Retrieve fixed bundle base price (with special price and rules)
  *
  * @param int $productId
  * @param array $priceData
  * @param Mage_Core_Model_Website $website
  * @param Mage_Customer_Model_Group $customerGroup
  * @return float
  */
 protected function _getBasePrice($productId, array $priceData, $website, $customerGroup)
 {
     $store = $website->getDefaultStore();
     $storeTimeStamp = Mage::app()->getLocale()->storeTimeStamp($store);
     $finalPrice = $this->_calculateSpecialPrice($priceData['price'], $priceData, $website);
     $rulePrice = Mage::getResourceModel('catalogrule/rule')->getRulePrice($storeTimeStamp, $website->getId(), $customerGroup->getId(), $productId);
     if ($rulePrice !== null && $rulePrice !== false) {
         $finalPrice = min($finalPrice, $rulePrice);
     }
     return $finalPrice;
 }