Tutorial by Examples

You can load Magento model using the following code: Mage::getModel('modulename/modelname') Example: Mage::getModel('catalog/product') This will load Mage_Catalog_Model_product
To create a new model in your module Add a folder Model in your module root folder and create a file Modelname.php in this folder. for example Rick/Demo/Model/Modelname.php The class name of your model does matter call it like this: <?php class Rick_Demo_Model_Modelname { } make sure y...

Page 1 of 1