Try the Demo

Magento Forum

   
SpecialPrice ?? 
 
srinigenie
Guru
 
Avatar
Total Posts:  539
Joined:  2008-02-04
 

Hi all,

I was trying to check on the code for special price derivation and was happy to find that the special price is displayed using
price.phtml (template/catalog/product) and there is call
$this->getProduct()->getFinalPrice()
which is a call to Mage_Catalog_Model_Product.getFinalPrice(). In this method there is a callt to getSpecialPrice() which I am not able to locate anywhere!!

I wonder how this is working and where the defintion of getSpecialPrice() method is? Also the getSpecialPrice() method returns NULL on the product search page and hence the old price is displayed on the search page results grid. Is this expected behaviour?

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Special price attribute should be loaded in search result product list - it is specified in Mage/CatalogSearch/Block/Result.php line 88

$product->getSpecialPrice() is handled by Varien_Object::__call() method and equivalent to $product->getData(’special_price’);

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top