Magento Override getPrice ()

I overridden the Magento product price rule by overriding the getPrice() method in the " Mage_Catalog_Model_Product_Type_Price " class, simple products work fine and show the updated price that I mentioned in getPrice()

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

But in the case of downloadable products, it shows the initial price. Any one of them can tell me how I can redefine the price in downloadable products.

thanks

+4
source share
1 answer

I would suggest that this would be chased before the getFinalPrice method from Mage_Downloadable_Model_Product_Price. Trying to edit the file to return an incomprehensible fixed amount and see if this value worked out. If so, you will also have to overload this model.

+2
source

Source: https://habr.com/ru/post/1390219/


All Articles