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, 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

Magento Forum

Manipulate product prices
Jr. Member
Total Posts:  1
Joined:  2009-01-14

Hello everyone,

I need to manipulate all prices that are shown in Magento, but its important to keep the chanings as small as possible. So I am looking for a method in the core of magento like getProduct($productID) that gets an product-object or an array containing product data so that I only have to change a few lines of code to get the products price, manipulate it, set the products price to the product bevor returning it.

I tried to get familiar with the architecture of Magento, but i couldn’t figure out if such a method exists or if not. Even if i have to modify two or three methods i would be happy, but what I don’t want is to change nealry every .phtml-file of the system, because that would be to much work with every new Version of Magento. So I want to manipulte the Price immediatly after an sql-query or something like that.

I don’t want you to tell me how to do that, but where to start looking for a possibility to do that would be really great!


Magento Community Magento Community
Magento Community
Magento Community
Total Posts:  48
Joined:  2008-07-22
United Kingdom


Have a look at these 2 files above. The first one is the Product class (you may have guessed) and the second is looking after price rules, formatting.

I am working with magento version 1.6. You question is quite vast and therefore I believe you seem to know what to know from this point.

I wanted to point out that modifying these files will make your upgrade more difficult though as these belong to the magento core. There are ways to overwrite these files without changing them. You can find examples on Mark Kimsal book

Good luck,


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