public function initContent()
 {
     if ($this->controller_status == STATUS3) {
         $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Activate the additional features in your TIME SAVER module in the Module section of your back-office! Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
     }
     if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) {
         $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature. (Preferences/Products/Products Stock)');
         return false;
     }
     return parent::initContent();
 }
 public function initContent()
 {
     if ($this->controller_status == STATUS1) {
         $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Do not limit yourself to a batch of 10 products, take advantage of the Light version of the Stock Management area for €79.99 before tax or €8.00/month before tax. Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
     } else {
         if ($this->controller_status == STATUS2) {
             $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Optimise the management of your stock with dynamic logs of stock images and the auto-incrementation of SKU for just €20.00 before tax or €1.00/month before tax. Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
         } else {
             if ($this->controller_status == STATUS3) {
                 $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Activate additional features in your TIME SAVER module in the Module section of your back-office! Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
             }
         }
     }
     parent::initContent();
 }
 public function initContent()
 {
     if ($this->controller_status == STATUS1) {
         $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Do not limit yourself to 3 orders, take advantage of the Light version of the client order area for €44.99 before tax or €5.00/month before tax. Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
     } else {
         if ($this->controller_status == STATUS2) {
             $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Optimise the management of your client orders with automatic sending for just €20 before tax or €2.00/month before tax. Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
         } else {
             if ($this->controller_status == STATUS3) {
                 $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Activate additional features in your TIME SAVER module in the Module section of your back-office! Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
             }
         }
     }
     parent::initContent();
 }
 public function initContent()
 {
     parent::initContent();
 }
 /**
  * AdminController::initContent() override
  * @see AdminController::initContent()
  */
 public function initContent()
 {
     $this->addJqueryUI('ui.dialog');
     $this->addjqueryPlugin('cluetip');
     $this->addJqueryUI('ui.datepicker');
     $this->addJS(_MODULE_DIR_ . 'erpillicopresta/js/advanced_supply_order.js');
     $this->addJS(_MODULE_DIR_ . 'erpillicopresta/js/advanced_supply_order_tools.js');
     if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) {
         $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature. (Preferences/Products/Products Stock)');
         return false;
     }
     // displays warning if there are no warehouses
     if (!Warehouse::getWarehouses(true)) {
         $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You must have at least one warehouse. See Stock/Warehouses');
         return false;
     }
     // Manage the add stock form
     if (Tools::isSubmit('changestate')) {
         $this->initChangeStateContent();
     } elseif (Tools::isSubmit('update_receipt') && Tools::isSubmit('id_supply_order')) {
         $this->initUpdateReceiptContent();
     } elseif (Tools::isSubmit('viewsupply_order') && Tools::isSubmit('id_supply_order')) {
         $this->action = 'view';
         $this->display = 'view';
         parent::initContent();
     } elseif (Tools::isSubmit('updatesupply_order')) {
         $this->initUpdateSupplyOrderContent();
     } else {
         parent::initContent();
     }
 }
 public function initContent()
 {
     if ($this->controller_status == STATUS3) {
         $this->informations[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Activate additional features in your TIME SAVER module in the Module section of your back-office! Go to your back-office, under the module tab, page 1-Click ERP!') . '</a>';
     }
     if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) {
         $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature. (Preferences/Products/Products Stock)');
         return false;
     }
     if (count(Warehouse::getWarehouses(true)) < 2) {
         $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to create at least two warehouses prior to using this feature.');
         return false;
     }
     $this->displayInformation($this->l('To transfer a stock of product between two warehouses, the product must be registered in both warehouses') . $this->l(' and the product must have a positive stock in the source warehouse.') . '<br />');
     $this->display = 'view';
     // add simple tooltip plugin
     $this->addJqueryPlugin('cluetip', _MODULE_DIR_ . 'erpillicopresta/js/cluetip/');
     if (version_compare(_PS_VERSION_, '1.5.2', '>=') && version_compare(_PS_VERSION_, '1.5.4', '<=')) {
         $this->addJqueryPlugin('custom.min', _MODULE_DIR_ . 'erpillicopresta/js/');
     } else {
         if (version_compare(_PS_VERSION_, '1.6', '>=')) {
             $this->addJqueryUI('ui.core');
             $this->addJqueryUI('ui.widget');
             $this->addJqueryUI('ui.dialog');
             $this->addJqueryUI('ui.position');
             $this->addJqueryUI('ui.button');
         } else {
             $this->addJqueryPlugin('ui.core.min', '/js/jquery/ui/');
             $this->addJqueryPlugin('ui.widget.min', '/js/jquery/ui/');
             $this->addJqueryPlugin('ui.dialog.min', '/js/jquery/ui/');
             $this->addJqueryPlugin('ui.position.min', '/js/jquery/ui/');
             $this->addJqueryPlugin('ui.button.min', '/js/jquery/ui/');
         }
     }
     // load JS
     $this->addJS(_MODULE_DIR_ . 'erpillicopresta/js/advanced_stock.js');
     $this->addJS(_MODULE_DIR_ . 'erpillicopresta/js/advanced_stock_tools.js');
     $this->addJS(_MODULE_DIR_ . 'erpillicopresta/js/stock_transfert.js');
     // load CSS
     $this->addCSS(_MODULE_DIR_ . 'erpillicopresta/css/jquery.custom.css');
     $this->addCSS(_MODULE_DIR_ . 'erpillicopresta/css/jquery.cluetip.css');
     $this->addCSS(_MODULE_DIR_ . 'erpillicopresta/css/stock.transfert.css');
     return parent::initContent();
 }