Save logisitic queue name in configuration

This commit is contained in:
Michael RICOIS 2018-03-21 10:32:59 +01:00
parent 76b26ac6b4
commit 7699f86acd

View File

@ -35,7 +35,7 @@ class Logistics extends Module
$t->active = TRUE;
$t->module = 'logistics';
$t->class_name = 'AdminLogistics';
foreach(Language::getLanguages() as $lang) {
foreach (Language::getLanguages() as $lang) {
if (isset($tabs_i18n[$lang['iso_code']])) {
$t->name[$lang['id_lang']] = $tabs_i18n[$lang['iso_code']];
} else {
@ -332,13 +332,13 @@ class Logistics extends Module
Configuration::updateValue('MONDIALRELAYWS_FTP_LOGIN', Tools::getValue('mondialrelay_ftp_login'));
Configuration::updateValue('MONDIALRELAYWS_FTP_PASSWORD', Tools::getValue('mondialrelay_ftp_password'));
// foreach(Tools::getValue('employee', array()) as $id_employee => $queue) {
// Configuration::updateValue('LOGISTICS_QUEUE_'.(int) $id_employee, $queue);
// }
// Set print queue - employe : name
foreach (Tools::getValue('employee', array()) as $id_employee => $queue) {
Configuration::updateValue('LOGISTICS_QUEUE_'.(int)$id_employee, $queue);
}
$lock = array();
foreach(explode(', ', Tools::getValue('lock_products')) as $item) {
foreach (explode(', ', Tools::getValue('lock_products')) as $item) {
$lock[] = (int) $item;
}
Configuration::updateValue('LOGISTICS_LOCK', serialize(implode(',', $lock)));
@ -465,7 +465,7 @@ class Logistics extends Module
<label for="laposte_exp_country">'.$this->l('Country:').'</label>
<select name="laposte_exp_country">';
foreach(Country::getCountries((int) $cookie->id_lang) as $country) {
foreach (Country::getCountries((int) $cookie->id_lang) as $country) {
$this->_html .= '<option value="'.$country['id_country'].'"'.(Configuration::get('LAPOSTEWS_EXP_COUNTRY') == $country['id_country']? ' selected="selected"': '').'>'.$country['name'].'</option>';
}
@ -563,7 +563,7 @@ class Logistics extends Module
';
$laposte_carriers = unserialize(Configuration::get('LAPOSTEWS_CARRIERS', serialize(array())));
foreach(Db::getInstance()->ExecuteS('
foreach (Db::getInstance()->ExecuteS('
SELECT c.*
FROM `'._DB_PREFIX_.'carrier` c
') as $carrier) {
@ -609,7 +609,7 @@ class Logistics extends Module
<label for="exapaq_exp_country">'.$this->l('Country:').'</label>
<select name="exapaq_exp_country">';
foreach(Country::getCountries((int) $cookie->id_lang) as $country) {
foreach (Country::getCountries((int) $cookie->id_lang) as $country) {
$this->_html .= '<option value="'.$country['id_country'].'"'.(Configuration::get('EXAPAQWS_EXP_COUNTRY') == $country['id_country']? ' selected="selected"': '').'>'.$country['name'].'</option>';
}
@ -701,7 +701,7 @@ class Logistics extends Module
';
$exapaq_carriers = unserialize(Configuration::get('EXAPAQWS_CARRIERS', serialize(array())));
foreach(Db::getInstance()->ExecuteS('
foreach (Db::getInstance()->ExecuteS('
SELECT c.*
FROM `'._DB_PREFIX_.'carrier` c
') as $carrier) {
@ -749,7 +749,7 @@ class Logistics extends Module
<label for="mondialrelay_exp_country">'.$this->l('Country:').'</label>
<select name="mondialrelay_exp_country">';
foreach(Country::getCountries((int) $cookie->id_lang) as $country) {
foreach (Country::getCountries((int) $cookie->id_lang) as $country) {
$this->_html .= '<option value="'.$country['id_country'].'"'.(Configuration::get('MONDIALRELAY_EXP_COUNTRY') == $country['id_country']? ' selected="selected"': '').'>'.$country['name'].'</option>';
}
@ -810,7 +810,7 @@ class Logistics extends Module
';
$mondialrelay_carriers = unserialize(Configuration::get('MONDIALRELAYWS_CARRIERS', serialize(array())));
foreach(Db::getInstance()->ExecuteS('
foreach (Db::getInstance()->ExecuteS('
SELECT c.*
FROM `'._DB_PREFIX_.'carrier` c
') as $carrier) {
@ -826,7 +826,7 @@ class Logistics extends Module
<fieldset id="tab-4" style="line-height: 1.5em; display: none;">
';
foreach(Employee::getEmployees() as $employee) {
foreach (Employee::getEmployees() as $employee) {
$value = Configuration::get('LOGISTICS_QUEUE_'.(int) $employee['id_employee']);
// if ($value === FALSE) {
// $value = Configuration::get('LAPOSTEWS_EMPL_'.(int) $employee['id_employee']);