Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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’);

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