Пример #1
0
 public function __construct()
 {
     parent::__construct();
     //specific instruction for PS 1.5 and greater
     if (_PS_VERSION_ >= '1.5') {
         $this->tpl_folder = AdminModulesController::getController('AdminOrdersController')->tpl_folder;
         $this->override_folder = AdminModulesController::getController('AdminOrdersController')->override_folder;
     }
     $this->calibrate();
     $this->module = Module::getInstanceByName('fianetfraud');
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     //specific instruction for PS 1.5 and greater
     if (_PS_VERSION_ >= '1.5') {
         $this->tpl_folder = AdminModulesController::getController('AdminOrdersController')->tpl_folder;
         $this->override_folder = AdminModulesController::getController('AdminOrdersController')->override_folder;
         $link = new Link();
         //sets the redirection according to the action
         switch (Tools::getValue('action')) {
             //if sendOrder, redirection to the admin order page
             case 'ResendOrder':
                 $this->redirect_after = $link->getAdminLink('AdminSceau') . "&id_order=" . Tools::getValue('id_order') . '&vieworder';
                 break;
                 //if unknown action
             //if unknown action
             default:
                 break;
         }
     }
     //build sql query which added to sql query of AdminOrders class
     $this->_select .= ', fs.`label` as `fs_label`';
     $this->_join .= 'LEFT JOIN `' . _DB_PREFIX_ . 'fianetsceau_order` fo ON a.`id_order` = fo.`id_order`';
     $this->_join .= 'LEFT JOIN `' . _DB_PREFIX_ . 'fianetsceau_state` fs ON fo.`id_fianetsceau_state` = fs.`id_fianetsceau_state`';
     //icons management
     if (_PS_VERSION_ >= '1.5') {
         $icons = array('sent' => array('src' => "../../modules/fianetsceau/img/sent.gif", 'alt' => 'Commande envoyée'), 'waiting payment' => array('src' => "../../modules/fianetsceau/img/waiting.gif", 'alt' => 'Commande en attente de paiement'), 'error' => array('src' => "../../modules/fianetsceau/img/not_concerned.png", 'alt' => 'Commande en erreur'), 'default' => "../../modules/fianetsceau/img/error.gif");
     } else {
         $icons = array('sent' => '../../modules/fianetsceau/img/sent.gif', 'waiting payment' => '../../modules/fianetsceau/img/waiting.gif', 'error' => '../../modules/fianetsceau/img/not_concerned.png', 'default' => "../../modules/fianetsceau/img/error.gif");
     }
     //personalize new column added in new order tab
     $column_definition = array('title' => $this->l('Sceau state'), 'width' => 50, 'icon' => $icons);
     if (_PS_VERSION_ >= '1.5') {
         $this->fields_list['fs_label'] = $column_definition;
     } else {
         $this->fieldsDisplay['fs_label'] = $column_definition;
     }
     $this->module = Module::getInstanceByName('fianetsceau');
 }