Magento Override getPrice()

牧云@^-^@ 提交于 2019-12-06 05:51:01

问题


I have overrode the price rule of Magento product by overriding the getPrice() method in "Mage_Catalog_Model_Product_Type_Price" class, simple products are working fine and show the updated price which I mentioned in getPrice() i.e

    public function getPrice($product)
    {
      return 80;
    }

But in the case of downloadable products it shows the original price, Any one here can tell me how can I override price in downloadable products.

Thanks


回答1:


I would guess that this will be chased down to the getFinalPrice method of Mage_Downloadable_Model_Product_Price. Trying editing the file to return an obscure fixed amount and see if that's the value you get. If it is then you will need to overload this model too.



来源:https://stackoverflow.com/questions/8803042/magento-override-getprice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!