Magento – How to Show Custom Product Price on Listing Page

product-list

I am developing an extension where I need to show discount prices of specific products on listing page. That products would be selected from admin end.

To display custom listing I have to replace the base file with below file of mine

app/design/frontend/default/default/template/mytheme/catalog/product/list.phtml

The list.phtml file is same as in base, but i have added some conditions for price display.

How could I achieve this ?

Thanks

Best Answer

To modify product price using custom logic you can rewrite getFinalPrice from the class Mage_Catalog_Model_Product.

You can find example how to extend magento core class using, for example, this tutorial http://inchoo.net/ecommerce/magento/how_to_override_magento_model_classes/