php - How to capture payment confirmation in magento? -


i need insert tags affiliation in magento website. problem is, can't find payment confirmation event captured redirect user success.phtml thanks

the order / payment place process carried saveorderaction() action method in mage_checkout_onepagecontroller controller class (in 'app/code/core/mage/checkout/controllers/onepagecontroller.php').

once order successful, customer redirected success page mentioned, handled successaction() action method in mage_checkout_onepagecontroller.

affiliate network tags should placed directly in 'success.phtml'. should have access order data need in template file. if reason need more work appropriate in template file, handle 'checkout_onepage_controller_success_action' event, thrown in successaction():

/**  * order success action  */ public function successaction() {     $session = $this->getonepage()->getcheckout();     if (!$session->getlastsuccessquoteid()) {         $this->_redirect('checkout/cart');         return;     }      $lastquoteid = $session->getlastquoteid();     $lastorderid = $session->getlastorderid();     $lastrecurringprofiles = $session->getlastrecurringprofileids();     if (!$lastquoteid || (!$lastorderid && empty($lastrecurringprofiles))) {         $this->_redirect('checkout/cart');         return;     }      $session->clear();     $this->loadlayout();     $this->_initlayoutmessages('checkout/session');     mage::dispatchevent('checkout_onepage_controller_success_action', array('order_ids' => array($lastorderid)));     $this->renderlayout(); } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -