Hello I have trying to learn Magento, So would be appreciated if anyone helps.
I saw people initiate class
Mage::getResouceModel('report/product_sold_collection');
Then they iterate over the collection using foreach loop and use
getOrderedQty() method.
Like in this thread.
total sales of each product in magento
Where is this method defined? In which class ?
That method doesn’t exist. All Magento Objects (that is, objects which inherit from
Varien_Object) allow you togetandsetdata properties.On top of this, there’s also special setter and getter methods implemented with PHP’s “magic methods”. That is, you can get/set a data property by camel casing it’s name, and calling it like this
I searched the Magento codebase, and there’s no definition for a “
getOrderedQty” method. That means it’s one of the above mentioned magic methods.