Magento News
Magento Custom Model via Mage::getSingleton()
If you are trying to load a custom model using the build in Mage::getSingleton() method and are struggling because it keeps looking in the Mage/ directory for your model instead of your custom model, the best solution I found was simply to put the entire class name of the model.
eg doesn’t work:
-
//trying to load EC/Custom/Model/Blah.php
-
Mage::getSingleton(‘EC_custom/blah’);
does work
-
//trying to load EC/Custom/Model/Blah.php
-
Mage::getSingleton(‘EC_Custom_Model_Blah’);
Possibly Related Posts:
- Alba Spectrum Linux eCommerce Integration to Dynamics GP Scenario
- 50+ High-Quality Free Magento Themes | Showcases | instantShift
- Web Development Company with Magento Experience Needed (Manila …
- Magento Launches iPhone Storefront Software – socalTech.com
- Magento unveils Magento Mobile platform
RSS Feed