Merge remote-tracking branch 'ticket/r16761-queue_name' into develop

This commit is contained in:
Michael RICOIS 2018-03-21 10:35:07 +01:00
commit ac1d708f5f
7 changed files with 45 additions and 39 deletions

View File

@ -24,7 +24,7 @@
Nous vous informons que vous avez dans votre compte un crédit de fidélité non utilisé suite à votre commande {commandenum}.
Celui-ci expire dans 1 mois.
Venez nous rendre visite sur le site : https://wwww.bebeboutik.com et profiter de nos offres jusqu'à -70% !
Venez nous rendre visite sur le site : https://www.bebeboutik.com et profiter de nos offres jusqu'à -70% !
</td>
</tr>
<tr>

View File

@ -3,6 +3,6 @@ Bonjour {firstname} {lastname},
Nous vous informons que vous avez dans votre compte un crédit de fidélité non utilisé suite à votre commande {commandenum}.
Celui-ci expire dans 1 mois.
Venez nous rendre visite sur le site : https://wwww.bebeboutik.com et profiter de nos offres jusqu'à -70% !
Venez nous rendre visite sur le site : https://www.bebeboutik.com et profiter de nos offres jusqu'à -70% !
L'équipe Bébé Boutik,

View File

@ -1,7 +1,7 @@
{if count($sizes) > 0}
<div class="block_filter">
<div class="content">
<h4 class="open{if $smarty.get.id_category==$cookie->filters_category && !empty($cookie->filters_value)} active{/if}">{l s='Recherche par' mod='filtervp'}</h4>
<h4 class="open">{l s='Recherche par' mod='filtervp'}</h4>
<div class="content_filter">
<ul id="filters">
@ -18,7 +18,6 @@
</div>
{/if}
<script>
{literal}
$(document).ready(function() {

View File

@ -92,5 +92,4 @@ class Filtervp extends Module
');
}
}

View File

@ -164,15 +164,15 @@ if($canSendInvitations) {
$tld = substr($friendEmail, $pointPos + 1);
$sld = substr($friendEmail, $atPos + 1, strlen($friendEmail) - ($atPos+1) - (strlen($tld)+1) );
if (empty($tld)) {
$this->errors[] = Tools::displayError('Invalid email');
$errors[] = Tools::displayError('Invalid email');
$_POST['friendsEmail'] = '';
}
if (empty($this->errors)) {
if (empty($errors)) {
// If you have a complete list of TLD, check it !
}
// Check SLD
if (empty($this->errors)) {
if (empty($errors)) {
// Real use case replacement
$friendEmail = strtr($friendEmail, $replaceSLD);
// Levenhstein remplacement

View File

@ -1,13 +1,14 @@
<?php
if(!defined('_PS_VERSION_')) {
if (!defined('_PS_VERSION_')) {
exit;
}
class Logistics extends Module {
class Logistics extends Module
{
public $_html = '';
public function __construct() {
public function __construct()
{
$this->name = 'logistics';
$this->tab = 'shipping_logistics';
$this->version = '2.0';
@ -20,7 +21,8 @@ class Logistics extends Module {
$this->description = $this->l('Allows to manage parcels');
}
public function install() {
public function install()
{
# Add admin tabs
$tabs_i18n = array(
'fr' => 'Gestion des envois',
@ -33,8 +35,8 @@ class Logistics extends Module {
$t->active = TRUE;
$t->module = 'logistics';
$t->class_name = 'AdminLogistics';
foreach(Language::getLanguages() as $lang) {
if(isset($tabs_i18n[$lang['iso_code']])) {
foreach (Language::getLanguages() as $lang) {
if (isset($tabs_i18n[$lang['iso_code']])) {
$t->name[$lang['id_lang']] = $tabs_i18n[$lang['iso_code']];
} else {
$t->name[$lang['id_lang']] = $tabs_i18n['en'];
@ -47,7 +49,8 @@ class Logistics extends Module {
&& $this->registerHook('updateCarrier');
}
private function installCarriers() {
private function installCarriers()
{
return
// La Poste
Db::getInstance()->Execute('
@ -150,7 +153,8 @@ class Logistics extends Module {
');
}
private function uninstallCarriers() {
private function uninstallCarriers()
{
/*Db::getInstance()->ExecuteS('DROP TABLE IF EXISTS `'._DB_PREFIX_.'lapostews`');
Db::getInstance()->ExecuteS('DROP TABLE IF EXISTS `'._DB_PREFIX_.'lapostews_pr`');
Db::getInstance()->ExecuteS('DROP TABLE IF EXISTS `'._DB_PREFIX_.'exapaqws`');
@ -161,14 +165,16 @@ class Logistics extends Module {
return TRUE;
}
public function uninstall() {
public function uninstall()
{
return $this->uninstallCarriers() && parent::uninstall();
}
public function getContent() {
public function getContent()
{
global $cookie;
if(Tools::isSubmit('submitUpdate')) {
if (Tools::isSubmit('submitUpdate')) {
/* La Poste */
Configuration::updateValue('LAPOSTEWS_CARRIERS', serialize(Tools::getValue('laposte_carriers', array())));
@ -326,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)));
@ -459,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>';
}
@ -557,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) {
@ -603,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>';
}
@ -695,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) {
@ -743,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>';
}
@ -804,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) {
@ -820,9 +826,9 @@ 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) {
// if ($value === FALSE) {
// $value = Configuration::get('LAPOSTEWS_EMPL_'.(int) $employee['id_employee']);
// }
@ -834,7 +840,7 @@ class Logistics extends Module {
}
$lock = Configuration::get('LOGISTICS_LOCK');
if($lock === FALSE || empty($lock)) {
if ($lock === false || empty($lock)) {
$lock = serialize(array());
}
@ -862,21 +868,21 @@ class Logistics extends Module {
$carriers = Configuration::get('LAPOSTEWS_CARRIERS');
if(in_array((int) $params['id_carrier'], $carriers)) {
if (in_array((int) $params['id_carrier'], $carriers)) {
$carriers[] = (int) $new_carrier_id;
Configuration::updateValue('LAPOSTEWS_CARRIERS', serialize($carriers));
}
$carriers = Configuration::get('EXAPAQWS_CARRIERS');
if(in_array((int) $params['id_carrier'], $carriers)) {
if (in_array((int) $params['id_carrier'], $carriers)) {
$carriers[] = (int) $new_carrier_id;
Configuration::updateValue('EXAPAQWS_CARRIERS', serialize($carriers));
}
$carriers = Configuration::get('MONDIALRELAYWS_CARRIERS');
if(in_array((int) $params['id_carrier'], $carriers)) {
if (in_array((int) $params['id_carrier'], $carriers)) {
$carriers[] = (int) $new_carrier_id;
Configuration::updateValue('MONDIALRELAYWS_CARRIERS', serialize($carriers));
}

View File

@ -1,6 +1,8 @@
<?php
class SitemapController extends SitemapControllerCore {
public function setMedia() {
class SitemapController extends SitemapControllerCore
{
public function setMedia()
{
parent::setMedia();
global $css_files;