1

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

4
  • Is it a question how to change template for the product default block? Or you'd like to modify product final price?
    – Amasty
    Aug 2, 2014 at 19:38
  • I would like to change template for product listing
    – Jordan
    Aug 4, 2014 at 4:29
  • Price is on the separate template, so probably you'd better modify product::getFinalPrice method
    – Amasty
    Aug 4, 2014 at 8:25
  • How and where to modify the getFinalPrice() method ?
    – Jordan
    Aug 4, 2014 at 11:13

1 Answer 1

1

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.