_blockGroup = 'orange35_custominvoicesgenerator'; $this->_controller = 'adminhtml_sales_custom_order'; $payments = Mage::getSingleton('payment/config')->getActiveMethods(); $isPPEnabled = true; foreach ($payments as $paymentCode => $paymentModel) { $isPPEnabled = $paymentCode == "paypal_express" || $paymentCode == "paypal_standard" ? true : $isPPEnabled; if ($isPPEnabled) { break; } } if (!Mage::getStoreConfig('paypal/general/business_account') || $isPPEnabled != true) { $this->_headerText = ''; parent::__construct(); $this->_removeButton('add'); $this->_removeButton('back'); Mage::getSingleton('adminhtml/session')->addError('You have no PayPal account settings for your store with PayPal Standard or PayPal Express Checkout. Please make the appropriate configurations first.'); } else { parent::__construct(); $this->_headerText = 'Custom Invoices'; } } }