getTrackSales('php') == false) { return; // not allowed to track via PHP } $event = $observer->getEvent(); $lastOrderId = $this->getOnepage()->getCheckout()->getLastOrderId(); if (!$lastOrderId) { // Can't find the order... Mage::log('Failed to find order'); return; } Mage::getModel('pap/pap')->registerOrderByID($lastOrderId); } } ?>