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 magento.stackexchange.com, 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 community@magento.com.

Magento Forum

magento unable to create an object
 
adisuns
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2010-07-04
 

Hello friends,

I am going though a big problem.

I have created a custom module say “abc” which extends one module file from core part.  it was was working properly since many days / months. But suddenly it was not working. It was not able to create an object.

$abc = Mage::getModel("abc/abc");
Here it was not creating $abc.

Can you help me to know the reason why its happening ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Indies Inc
Sr. Member
 
Avatar
Total Posts:  193
Joined:  2013-09-18
 

Hi,
Which method you have used to create object of the class ?
May be this solution can help you,

Suppose your class name is ‘XYZ_ABC_Model_ABC’ then create the object like this.

<?php $abc = new XYZ_ABC_Model_ABC?>

So it will create object and you can use all the methods that defined in this class and also use inherited methods.

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