magento - Get customer object on an event -


i’m trying createan observer on following event.: ‘sales_order_payment_pay’.

however according magento doc http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/magento_events

i don’t have parameters avalaible on event..

do have idea how retrieve customer object (i need info such customer id , customer email)?

thanks feedback , anyway wish nice day,

anselme

this event expose payment object, should able chain off of object want:

public function yourobserverfunction($event) {     $payment = $event['payment'];     $customer = $payment->getorder()->getcustomer();     // ... useful } 

generally objects in magento can chained this, , code doesn't rely on event being triggered customer session (which not assumption anyway).

hope helps!

thanks, joe


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -