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 ?

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

2 Answers 2

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');
1
  • thx @Marius ! It works ! Commented Jul 21, 2016 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 and acknowledge you have read our privacy policy.

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