0

I tried to call a model from another module but it returns me false or this error message:

Fatal error: Call to a member function assignData() on a non-object

This is how I call it:

Mage::getModel('adyen_payment/adyen_paybymail')->assignData(100);

The model can be found here. I checked the config.xml and I see the model tag is in the global tag. Any idea ?

  • Please provide detail of assign data method, or provide full detail of class. – Murtuza Zabuawala Jul 21 '16 at 6:35
  • try this : Mage::getModel('payment/adyen_paybymail')->assignData(100); – Abdul Jul 21 '16 at 6:37
3

In the config.xml the models are defined like this:

<models>
    <adyen>
        <class>Adyen_Payment_Model</class>
        <resourceModel>adyen_resource</resourceModel>
    </adyen>
    ....
</models>

so you need to get your model like this:

Mage::getModel('adyen/adyen_payByMail');
  • thx @Marius ! It works ! – Attila Naghi Jul 21 '16 at 6:39
1

try this

Mage::getModel('adyen/adyen_paybymail')->assignData(100);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.