コード例 #1
0
 /**
  * Wrapper to get special price.
  *
  * @param  Mage_Catalog_Model_Product $product
  * @return float
  */
 public function getSpecialPrice($product = null)
 {
     if ($this->getGenerator()->getConfig()->isSimplePricingEnabled($this->getGenerator()->getStoreId())) {
         //if simple pricing is on, we need to take the special price from the same product we used to take the price
         $priceSource = $this->getPriceSourceMap();
         if (!empty($priceSource)) {
             return $priceSource->getSpecialPrice();
         }
     } else {
         return parent::getSpecialPrice($product);
     }
 }