protected function _checkMigrations()
 {
     /** @var Amasty_Shopby_Helper_Migration $migrations */
     $migrations = Mage::helper('amshopby/migration');
     $real = $migrations->getRealStateVersion();
     $next = $migrations->getRealNextStateVersion();
     if ($next) {
         $link = Mage_Adminhtml_Helper_Data::getUrl("amshopby/adminhtml_filter/fixmigration", array('version' => $real));
         $msg = $this->__('Migration issue detected; <a href="' . $link . '">click here</a> to fix. Please contact Amasty Support in case issue not fixed.');
         $this->_getSession()->addError($msg);
     }
 }
Ejemplo n.º 2
0
 function sendHoldEmail($order, $fraudResult)
 {
     $mailTemplate = Mage::getModel('core/email_template');
     /* @var $mailTemplate Mage_Core_Model_Email_Template */
     $template = Mage::getStoreConfig('frauddetection/general/email_when_holded_template');
     $copyTo = explode(",", Mage::getStoreConfig('frauddetection/general/email_when_holded_copy_to'));
     if ($copyTo) {
         $mailTemplate->addBcc($copyTo);
     }
     $_reciever = Mage::getStoreConfig('frauddetection/general/email_when_holded_reciever');
     $sendTo = array(array('email' => Mage::getStoreConfig('trans_email/ident_' . $_reciever . '/email'), 'name' => Mage::getStoreConfig('trans_email/ident_' . $_reciever . '/name')));
     foreach ($sendTo as $recipient) {
         $mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => Mage::app()->getStore()->getId()))->sendTransactional($template, 'sales', $recipient['email'], $recipient['name'], array('increment_id' => $order->getIncrementId(), 'fraudScore' => $fraudResult['riskScore'], 'orderLink' => Mage_Adminhtml_Helper_Data::getUrl('dsadmin/sales_order/view', array('order_id' => $order->getId()))));
     }
 }