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

Payment methods in observer
 
arthurio
Jr. Member
 
Total Posts:  10
Joined:  2012-10-11
 

In model i could get payment methods id’s with this code:

$payments Mage::getModel('payment/config')->getActiveMethods();
 
$paymentsName $payments->getId();
But in observer it gives me error, like i’m using function getId() on non-object.
In model, variable $paymentsName would give me something like this:
string 'ccsave' (length=6)

string 'checkmo' (length=7)

string 'free' (length=4)

string 'banktransfer' (length=12)

string 'paypal_billing_agreement' (length=24)
How can i get these values in my observer?
 
Magento Community Magento Community
Magento Community
Magento Community
 
arthurio
Jr. Member
 
Total Posts:  10
Joined:  2012-10-11
 

Any one? I’m really desparate :/

 
Magento Community Magento Community
Magento Community
Magento Community
 
TreInnova
Guru
 
Avatar
Total Posts:  465
Joined:  2009-02-20
Fano
 
arthurio - 19 February 2013 03:49 AM

In model i could get payment methods id’s with this code:

$payments Mage::getModel('payment/config')->getActiveMethods();
 
$paymentsName $payments->getId();
But in observer it gives me error, like i’m using function getId() on non-object.
In model, variable $paymentsName would give me something like this:
string 'ccsave' (length=6)

string 'checkmo' (length=7)

string 'free' (length=4)

string 'banktransfer' (length=12)

string 'paypal_billing_agreement' (length=24)


How can i get these values in my observer?

Hi which is the dispatch event you are observing?
regards
filippo.

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