mondialrelay
-
+
diff --git a/modules/mondialrelay/fr.php b/modules/mondialrelay/fr.php
index 94202ad09..3efd59f50 100755
--- a/modules/mondialrelay/fr.php
+++ b/modules/mondialrelay/fr.php
@@ -2,18 +2,18 @@
global $_MODULE;
$_MODULE = array();
-$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_a25569b97604bddcfba04d7eb9950eeb'] = 'Pour générer des étiquettes, vous devez inscrire une adresse correcte pour votre boutique sur ';
-$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3d2da0d2e731d59465a92f13216cf82d'] = 'La page de contact';
-$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un status';
+$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_d1908b9b04e81c4b6112e38b608c49af'] = 'Merci de bien vouloir corriger les erreurs suivantes dans';
+$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_ccce63109db30895153094de05c60fa5'] = 'la page de contact';
+$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un statut';
+$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_a0bf3c9ac2d785f053d883b8746e91ba'] = 'seront disponibles pour la création d\'ètiquette';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_2345e28c9b93f368968be4781ed70f5c'] = 'Changer la configuration';
-$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_37c85a61df6352af7285c307022c4413'] = 'Aucune commande n\'existe avec ce status';
+$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_37c85a61df6352af7285c307022c4413'] = 'Aucune commande n\'existe avec ce statut';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_d79cf3f429596f77db95c65074663a54'] = 'Identifiant de la commande';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_ce26601dac0dea138b7295f02b7620a7'] = 'Client';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_0eede552438475bdfe820c13f24c9399'] = 'Prix total';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_f4e8b53a114e5a17d051ab84d326cae5'] = 'Total frais d\'expédition';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_44749712dbec183e983dcd78a7736c41'] = 'Date';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3715c824cbc0f966c61a72254f248a2e'] = 'Mettez un poids (grammes)';
-$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_5635c2608fff4c95a564aea8c6118b8c'] = 'Inverser la sélection';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Numéro MR';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_f9c50cba4de9032d7a6797a2458f8ed9'] = 'Pays MR';
$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_428c091372d840900cf8536519fa0056'] = 'Numéro d\'expedition';
@@ -48,7 +48,7 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_cb5e100e5a9a3e7f6d1fd9751221528
$_MODULE['<{mondialrelay}prestashop>mondialrelay_350c1cc4343826a89f08a33bb49c6d98'] = 'Configuration du Module Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegarder vos paramètres Mondial Relay';
-$_MODULE['<{mondialrelay}prestashop>mondialrelay_94fbe32464fcfa902feed9f256439833'] = 'Créer un transporteur utilisant le formulaire \"ajouter un transporteur\" ci-dessous';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_94fbe32464fcfa902feed9f256439833'] = 'Créez un transporteur via le formulaire ‘’ajouter un transporteur’’ ci-dessous';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_b962d8fb95f5a439f50502152f3bad71'] = 'Definissez un prix pour votre transporteur sur';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_faf1247ae6846a9955a466d4f301bbe4'] = 'La page Transporteurs';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_10d78806b84b97ebc774e9f6277af6ac'] = 'Pour générer vos étiquettes, vous devez avoir enregistré une adresse valide de votre boutique sur votre';
@@ -77,9 +77,9 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_0309a6c666a7a803fdb9db95de71cf0
$_MODULE['<{mondialrelay}prestashop>mondialrelay_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgique';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_06630c890abadde9228ea818ce52b621'] = 'Luxembourg';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_907eba32d950bfab68227fd7ea22999b'] = 'Espagne';
-$_MODULE['<{mondialrelay}prestashop>mondialrelay_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des tranporteurs';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des transporteurs';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé';
-$_MODULE['<{mondialrelay}prestashop>mondialrelay_8596361cec00f8d2438d264827eee737'] = 'Modification de la configuration';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_8596361cec00f8d2438d264827eee737'] = 'Modifier les paramètres de ce transporteur';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_1d1d57f5840e1da871622295ba206b30'] = 'Cliquez pour afficher / cacher les options';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de la tache CRON à lancer pour la mise à jour des statuts de commandes';
@@ -110,10 +110,12 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7
$_MODULE['<{mondialrelay}prestashop>mondialrelay_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_91b442d385b54e1418d81adc34871053'] = 'Sélectionné';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_ef2a1f426c2c289ed5986c7636a5d696'] = 'Merci de choisir un point relay';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_80a0c205cd57b22fca7f174253870300'] = 'Heures d\'ouvertures';
+$_MODULE['<{mondialrelay}prestashop>mondialrelay_2b56b60f878922093facd42284848a0c'] = 'Plus de détails';
$_MODULE['<{mondialrelay}prestashop>orderdetail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison à';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
-$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être rensignée';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :';
@@ -121,6 +123,14 @@ $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :';
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Merci de vérifier la configuration de votre langue';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Merci de vérifier la configuration de votre nom de boutique';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone';
+$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email';
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé';
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide';
@@ -142,3 +152,17 @@ $_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c
$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler';
$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.';
$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut être trouvé';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercredi';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche';
+$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.';
diff --git a/modules/mondialrelay/mondialrelay.js b/modules/mondialrelay/mondialrelay.js
index e65e9ed23..9944b587d 100755
--- a/modules/mondialrelay/mondialrelay.js
+++ b/modules/mondialrelay/mondialrelay.js
@@ -1,6 +1,7 @@
var toggle_status_order_list = false;
var toggle_history_order_list = false;
var relay_point_max = 10;
+var last_gmap_info_clicked = '';
// /!\ All the following list data could be store into the same variable
// But for a better reading of the code, there are separated
@@ -665,7 +666,7 @@ function PS_MRGmapResizeEvent($map)
** Move the view of the gmap to a marker
** liable to the relay point
*/
-function PS_MRGmapPlaceViewOnMarker($map, marker)
+function PS_MRGmapPlaceViewOnMarker($map, marker, relayNum)
{
$map.gmap3(
{
@@ -673,6 +674,7 @@ function PS_MRGmapPlaceViewOnMarker($map, marker)
args:[marker.position],
callback: function()
{
+ PS_MRDisplayClickedGmapWindow(marker, relayNum, $map);
(function(m)
{
setTimeout(function()
@@ -713,7 +715,7 @@ function PS_MRDisplayGmap(contentBlockid, $map)
$('#PS_MRGmap_' + id_carrier).slideDown('fast', function()
{
PS_MRGmapResizeEvent($map);
- PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber]);
+ PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber);
});
}
else
@@ -727,13 +729,60 @@ function PS_MRDisplayGmap(contentBlockid, $map)
$('#' + contentBlockid).after($(this));
$('#PS_MRGmap_' + id_carrier).slideDown('fast', function()
{
- PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber]);
+ PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber);
});
}
});
}
}
+/*
+** Generate an html block to display the opening hours details
+*/
+function PS_MRGetTimeRelayDetail(relayInfo)
+{
+ onClick = 'onClick="PS_MROpenPopupDetail(\'' + relayInfo.permaLinkDetail + '\')"';
+
+ var html = ' \
+ ';
+ return html;
+}
+
+/*
+** Call a MondialRelay page into a popup
+*/
+function PS_MROpenPopupDetail(url)
+{
+ window.open(url, 'MondialRelay',
+ 'height=200, width=400, top=100, left=100, toolbar=no, menubar=yes, \
+ location=no, resizable=yes, scrollbars=no, status=no');
+}
+
+/*
+** Display the gmap windows selected by the user
+*/
+function PS_MRDisplayClickedGmapWindow(marker, relayNum, mapObject)
+{
+ if (last_gmap_info_clicked.length)
+ {
+ // Close the last opening window in gmap
+ if ((lastWin = mapObject.gmap3({action:'get', name:'infowindow', tag:last_gmap_info_clicked})))
+ lastWin.close();
+ }
+
+ // Open the selected detail window
+ map = mapObject.gmap3('get');
+ if ((currentWindow = mapObject.gmap3({action:'get', name:'infowindow', tag:relayNum})))
+ currentWindow.open(map, marker);
+ last_gmap_info_clicked = relayNum;
+}
+
/*
** Add a new Marker to a Gmap for a carrier using the
** relay point information
@@ -743,20 +792,30 @@ function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid)
// Check if the gmap has been properly created
if (GmapList[id_carrier] == undefined)
return ;
- relayInfo = relayPointDataContainers[relayPointNumber];
+ var relayInfo = relayPointDataContainers[relayPointNumber];
+ var detailContentHtml = PS_MRGetTimeRelayDetail(relayInfo);
// Add Marker to the map
- fullFormatedAddress = relayInfo.LgAdr1 + ' ' + relayInfo.LgAdr3 + ' ' +
+ var fullFormatedAddress = relayInfo.LgAdr1 + ' ' + relayInfo.LgAdr3 + ' ' +
relayInfo.CP + ' ' + relayInfo.Ville + ' ' + relayInfo.Pays;
GmapList[id_carrier].gmap3(
{
action: 'addMarker',
address: fullFormatedAddress,
+ tag:relayInfo.Num,
map:
{
center: true,
zoom: 14
},
+ marker: {
+ events:
+ {
+ click:function(marker, event, data)
+ {
+ PS_MRDisplayClickedGmapWindow(marker, relayInfo.Num, $(this));
+ }
+ },
callback: function(marker)
{
if (marker)
@@ -776,6 +835,18 @@ function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid)
return true;
}
}
+ },
+ infowindow:
+ {
+ options: {content:detailContentHtml},
+ tag:relayInfo.Num,
+ callback: function() {
+ // To avoid any bug, foreach anytime the elements and try to close them
+ var windowList = $(this).gmap3({action:'get', name:'infowindow', all:true});
+ for (var x in windowList)
+ windowList[x].close();
+ }
+ }
});
return false;
}
diff --git a/modules/mondialrelay/mondialrelay.php b/modules/mondialrelay/mondialrelay.php
index 7a62601b2..8752dd5f4 100755
--- a/modules/mondialrelay/mondialrelay.php
+++ b/modules/mondialrelay/mondialrelay.php
@@ -1,6 +1,6 @@
name = 'mondialrelay';
$this->tab = 'shipping_logistics';
- $this->version = '1.7.5.1';
+ $this->version = '1.7.6';
parent::__construct();
$this->page = basename(__FILE__, '.php');
$this->displayName = $this->l('Mondial Relay');
$this->description = $this->l('Deliver in Relay points');
-
+
self::initModuleAccess();
-
+
// Call everytime to prevent the changement of the module by a recent one
$this->_updateProcess();
}
-
+
public function install()
{
$name = "shipping";
@@ -82,19 +82,19 @@ class MondialRelay extends Module
return false;
Db::getInstance()->executeS(
- 'SELECT `name`
- FROM `' . _DB_PREFIX_ . 'hook`
- WHERE `name` = \''.$name.'\'
+ 'SELECT `name`
+ FROM `' . _DB_PREFIX_ . 'hook`
+ WHERE `name` = \''.$name.'\'
AND `title` = \''.$title.'\'');
if (!Db::getInstance()->NumRows())
- Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'hook
- (name, title, description, position)
+ Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'hook
+ (name, title, description, position)
VALUES(\''.$name.'\', \''.$title.'\', NULL, 0)');
if (!$this->registerHookByVersion())
return false;
-
+
if ((!file_exists(self::$modulePath.self::INSTALL_SQL_FILE)) ||
(!$sql = file_get_contents(self::$modulePath.self::INSTALL_SQL_FILE)))
return false;
@@ -106,7 +106,7 @@ class MondialRelay extends Module
Db::getInstance()->execute(trim($query));
$result = Db::getInstance()->getRow('
- SELECT id_tab
+ SELECT id_tab
FROM `' . _DB_PREFIX_ . 'tab`
WHERE class_name="AdminMondialRelay"');
@@ -114,36 +114,36 @@ class MondialRelay extends Module
{
/*tab install */
$result = Db::getInstance()->getRow('
- SELECT position
- FROM `' . _DB_PREFIX_ . 'tab`
+ SELECT position
+ FROM `' . _DB_PREFIX_ . 'tab`
WHERE `id_parent` = 3
ORDER BY `'. _DB_PREFIX_ .'tab`.`position` DESC');
$pos = (isset($result['position'])) ? $result['position'] + 1 : 0;
Db::getInstance()->execute('
- INSERT INTO ' . _DB_PREFIX_ . 'tab
- (id_parent, class_name, position, module)
- VALUES(3, "AdminMondialRelay", "'.(int)($pos).'", "mondialrelay")');
+ INSERT INTO ' . _DB_PREFIX_ . 'tab
+ (id_parent, class_name, position, module)
+ VALUES(3, "AdminMondialRelay", "'.(int)($pos).'", "mondialrelay")');
+
+ $id_tab = Db::getInstance()->Insert_ID();
- $id_tab = Db::getInstance()->Insert_ID();
-
$languages = Language::getLanguages();
foreach ($languages as $language)
Db::getInstance()->execute('
- INSERT INTO ' . _DB_PREFIX_ . 'tab_lang
- (id_lang, id_tab, name)
+ INSERT INTO ' . _DB_PREFIX_ . 'tab_lang
+ (id_lang, id_tab, name)
VALUES("'.(int)($language['id_lang']).'", "'.(int)($id_tab).'", "Mondial Relay")');
$profiles = Profile::getProfiles(Configuration::get('PS_LANG_DEFAULT'));
foreach ($profiles as $profile)
Db::getInstance()->execute('
- INSERT INTO ' . _DB_PREFIX_ . 'access
+ INSERT INTO ' . _DB_PREFIX_ . 'access
(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`)
VALUES('.$profile['id_profile'].', '.(int)($id_tab).', 1, 1, 1, 1)');
@copy(_PS_MODULE_DIR_.'mondialrelay/AdminMondialRelay.gif', _PS_IMG_DIR_.'/AdminMondialRelay.gif');
- }
+ }
// If module isn't installed, set default value
if (!Configuration::get('MONDIAL_RELAY'))
@@ -159,7 +159,7 @@ class MondialRelay extends Module
Configuration::updateValue('MR_WEIGHT_COEF', '');
Configuration::updateValue('PS_MR_SHOP_NAME', Configuration::get('PS_SHOP_NAME'));
}
- else
+ else
{
// Reactive transport if database wasn't remove at the last uninstall
Db::getInstance()->execute('
@@ -168,16 +168,16 @@ class MondialRelay extends Module
WHERE c.id_carrier = m.id_carrier');
if (Configuration::get('MONDIAL_RELAY') < $this->version)
;// TODO : ADD upgrade process depending of the last and new version
- }
+ }
return true;
}
-
+
/*
- ** Return the token depend of the type
+ ** Return the token depend of the type
*/
static public function getToken($type = 'front')
{
- return ($type == 'front') ? self::$MRFrontToken : (($type == 'back') ?
+ return ($type == 'front') ? self::$MRFrontToken : (($type == 'back') ?
self::$MRBackToken : NULL);
}
@@ -186,14 +186,14 @@ class MondialRelay extends Module
*/
private function registerHookByVersion()
{
- if (_PS_VERSION_ >= '1.3' &&
+ if (_PS_VERSION_ >= '1.3' &&
(!$this->registerHook('shipping') ||
!$this->registerHook('extraCarrier') ||
!$this->registerHook('updateCarrier') ||
!$this->registerHook('newOrder') ||
!$this->registerHook('BackOfficeHeader')))
return false;
-
+
if (_PS_VERSION_ >= '1.4' &&
(!$this->registerHook('processCarrier') ||
!$this->registerHook('orderDetail') ||
@@ -201,49 +201,49 @@ class MondialRelay extends Module
return false;
return true;
}
-
+
public function uninstallCommonData()
{
// Tab uninstall
$result = Db::getInstance()->getRow('
- SELECT id_tab
+ SELECT id_tab
FROM `' . _DB_PREFIX_ . 'tab`
WHERE class_name="AdminMondialRelay"');
-
+
if ($result)
{
$id_tab = $result['id_tab'];
if (isset($id_tab) && !empty($id_tab))
- {
+ {
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'tab WHERE id_tab = '.(int)($id_tab));
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'tab_lang WHERE id_tab = '.(int)($id_tab));
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'access WHERE id_tab = '.(int)($id_tab));
}
}
- if (_PS_VERSION_ >= '1.4' &&
+ if (_PS_VERSION_ >= '1.4' &&
!Db::getInstance()->execute('
- UPDATE '._DB_PREFIX_ .'carrier
- SET `active` = 0, `deleted` = 1
+ UPDATE '._DB_PREFIX_ .'carrier
+ SET `active` = 0, `deleted` = 1
WHERE `external_module_name` = "mondialrelay"'))
return false;
else if (!Db::getInstance()->execute('
- UPDATE '._DB_PREFIX_ .'carrier
- SET `active` = 0, `deleted` = 1
+ UPDATE '._DB_PREFIX_ .'carrier
+ SET `active` = 0, `deleted` = 1
WHERE `name` = "mondialrelay"'))
return false;
return true;
}
-
+
public function uninstall()
{
if (!parent::uninstall())
return false;
-
- // Uninstall data that doesn't need to be keep
+
+ // Uninstall data that doesn't need to be keep
if (!$this->uninstallCommonData())
return false;
-
+
if (Tools::getValue('keepDatabase'))
{
// Retro Compatibility for older Version than 1.7
@@ -255,7 +255,7 @@ class MondialRelay extends Module
}
return true;
}
-
+
// MondialRelay Configuration
if (!Configuration::deleteByName('MONDIAL_RELAY') ||
!Configuration::deleteByName('MONDIAL_RELAY_INSTALL_UPDATE') ||
@@ -268,22 +268,22 @@ class MondialRelay extends Module
!Configuration::deleteByName('MR_WEIGHT_COEF') ||
!Configuration::deleteByName('PS_MR_SHOP_NAME'))
return false;
-
+
// Drop databases
if (!Db::getInstance()->execute('
- DROP TABLE
- '._DB_PREFIX_ .'mr_historique,
- '._DB_PREFIX_ .'mr_method,
+ DROP TABLE
+ '._DB_PREFIX_ .'mr_historique,
+ '._DB_PREFIX_ .'mr_method,
'._DB_PREFIX_ .'mr_selected'))
return false;
else if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'carrier SET `active` = 0, `deleted` = 1 WHERE `name` = "mondialrelay"'))
- return false;
-
+ return false;
+
return true;
}
-
+
/*
- ** UpdateProcess if merchant update the module without a
+ ** UpdateProcess if merchant update the module without a
** normal installation
*/
private function _updateProcess()
@@ -298,7 +298,7 @@ class MondialRelay extends Module
if ($installedVersion < '1.4.2')
$this->_update_v1_4_2();
}
-
+
// Process update done just try to update the new configuration value
if (Configuration::get('MONDIAL_RELAY_1_4'))
{
@@ -306,28 +306,28 @@ class MondialRelay extends Module
Configuration::deleteByName('MONDIAL_RELAY_1_4');
}
}
-
+
/*
- ** Use if the mechant was using Prestashop 1.3 and
+ ** Use if the mechant was using Prestashop 1.3 and
** now use 1.4 or more recent
*/
private function _update_v1_4()
{
Db::getInstance()->execute('
- UPDATE `'._DB_PREFIX_.'carrier`
- SET
- `shipping_external` = 0,
- `need_range` = 1,
- `external_module_name` =
- "mondialrelay",
- `shipping_method` = 1
- WHERE `id_carrier`
- IN (SELECT `id_mr_method`
+ UPDATE `'._DB_PREFIX_.'carrier`
+ SET
+ `shipping_external` = 0,
+ `need_range` = 1,
+ `external_module_name` =
+ "mondialrelay",
+ `shipping_method` = 1
+ WHERE `id_carrier`
+ IN (SELECT `id_mr_method`
FROM `'._DB_PREFIX_.'mr_method`)');
}
-
+
/*
- ** Add new Hook for the last recent version >= 1.4.2
+ ** Add new Hook for the last recent version >= 1.4.2
*/
private function _update_v1_4_2()
{
@@ -336,23 +336,23 @@ class MondialRelay extends Module
if (!$this->isRegisteredInHook('BackOfficeHeader'))
$this->registerHook('BackOfficeHeader');
}
-
+
/*
** Get the content to ask for a backup of the database
- */
+ */
private function askForBackup($href)
{
return 'targetButton = \''.$href.'\';
PS_MRGetUninstallDetail();';
}
-
+
/*
** OnClick for input fields under the module list fields action
*/
public function onclickOption($type, $href = false)
{
$content = '';
-
+
switch($type)
{
case 'desactive':
@@ -368,7 +368,7 @@ class MondialRelay extends Module
}
return $content;
}
-
+
/*
** Init the access directory module for URL and file system
** Allow a compatibility for Presta < 1.4
@@ -378,18 +378,18 @@ class MondialRelay extends Module
self::$modulePath = _PS_MODULE_DIR_. 'mondialrelay/';
self::$MRFrontToken = sha1('mr'._COOKIE_KEY_.'Front');
self::$MRBackToken = sha1('mr'._COOKIE_KEY_.'Back');
-
- $protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS'])
+
+ $protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS'])
&& strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://';
-
+
$endURL = __PS_BASE_URI__.'/modules/mondialrelay/';
-
+
if (method_exists('Tools', 'getShopDomainSsl'))
self::$moduleURL = $protocol.Tools::getShopDomainSsl().$endURL;
else
- self::$moduleURL = $protocol.$_SERVER['HTTP_HOST'].$endURL;
+ self::$moduleURL = $protocol.$_SERVER['HTTP_HOST'].$endURL;
}
-
+
/*
** Override a jQuery version included by another one us.
** Allow a compatibility for Presta < 1.4
@@ -399,17 +399,17 @@ class MondialRelay extends Module
if ($overloadCurrent)
return '
';
return '
';
}
-
+
public function hookNewOrder($params)
{
DB::getInstance()->Execute('
@@ -417,12 +417,12 @@ class MondialRelay extends Module
SET `id_order` = '.$params['order']->id.'
WHERE `id_cart` = '.$params['cart']->id);
}
-
+
public function hookBackOfficeHeader()
{
$cssFilePath = $this->_path.'style.css';
$jsFilePath= $this->_path.'mondialrelay.js';
-
+
return '
'.
self::getJqueryCompatibility(true);
}
-
+
private function _postValidation()
{
if (Tools::isSubmit('submitMR'))
@@ -484,11 +484,11 @@ class MondialRelay extends Module
foreach($_POST AS $key => $value)
{
$setArray[] = $value;
- $keyArray[] = pSQL($key);
+ $keyArray[] = pSQL($key);
}
array_pop($setArray);
array_pop($keyArray);
-
+
if (isset($_POST['submitMR']) AND $_POST['submitMR'])
self::mrUpdate('settings', $setArray, $keyArray);
else if (isset($_POST['submitShipping']) AND $_POST['submitShipping'])
@@ -509,7 +509,7 @@ class MondialRelay extends Module
{
$carrier = $params['carrier'];
$order = $params['order'];
-
+
if ($carrier->is_module AND $order->shipping_number)
{
$module = $carrier->external_module_name;
@@ -520,7 +520,7 @@ class MondialRelay extends Module
else if ($carrier->url AND $order->shipping_number)
$this->context->smarty->assign('followup', str_replace('@', $order->shipping_number, $carrier->url));
}
-
+
public function hookOrderDetailDisplayed($params)
{
$res = Db::getInstance()->getRow('
@@ -532,68 +532,77 @@ class MondialRelay extends Module
$this->context->smarty->assign('mr_addr', $res['MR_Selected_LgAdr1'].($res['MR_Selected_LgAdr1'] ? ' - ' : '').$res['MR_Selected_LgAdr2'].($res['MR_Selected_LgAdr2'] ? ' - ' : '').$res['MR_Selected_LgAdr3'].($res['MR_Selected_LgAdr3'] ? ' - ' : '').$res['MR_Selected_LgAdr4'].($res['MR_Selected_LgAdr4'] ? ' - ' : '').$res['MR_Selected_CP'].' '.$res['MR_Selected_Ville'].' - '.$res['MR_Selected_Pays']);
return $this->display(__FILE__, 'orderDetail.tpl');
}
-
+
/*
** No need anymore
*/
public function hookProcessCarrier($params)
{
}
-
+
public function hookupdateCarrier($params)
{
+ // TODO : History shipping
+ /*if ((int)($params['id_carrier']) != (int)($params['carrier']->id))
+ {
+ $serviceSelected = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'mr_method` WHERE `id_carrier` = '.(int)$params['id_carrier']);
+ $update = array('id_carrier' => (int)($params['carrier']->id), 'id_carrier_history' => pSQL($serviceSelected['id_carrier_history'].'|'.(int)($params['carrier']->id)));
+ Db::getInstance()->autoExecute(_DB_PREFIX_.'mr_method', $update, 'UPDATE', '`id_carrier` = '.(int)$params['id_carrier']);
+ }*/
+
+ // TODO : Delete for shipping history
$new_carrier = $params['carrier'];
// Depends of the Prestashop version, the matches key isn't the same
if ((_PS_VERSION_ >= '1.4' && $new_carrier->external_module_name == 'mondialrelay') ||
$new_carrier->name = 'mondialrelay')
{
$mr_data = Db::getInstance()->getRow('
- SELECT *
- FROM `'._DB_PREFIX_.'mr_method`
+ SELECT *
+ FROM `'._DB_PREFIX_.'mr_method`
WHERE `id_carrier` = '.(int)($params['id_carrier']));
-
+
Db::getInstance()->execute('
- INSERT INTO `'._DB_PREFIX_.'mr_method`
+ INSERT INTO `'._DB_PREFIX_.'mr_method`
(mr_Name, mr_Pays_list, mr_ModeCol, mr_ModeLiv, mr_ModeAss, id_carrier)
VALUES (
- "'.pSQL($mr_data['mr_Name']).'",
- "'.pSQL($mr_data['mr_Pays_list']).'",
- "'.pSQL($mr_data['mr_ModeCol']).'",
- "'.pSQL($mr_data['mr_ModeLiv']).'",
- "'.pSQL($mr_data['mr_ModeAss']).'",
+ "'.pSQL($mr_data['mr_Name']).'",
+ "'.pSQL($mr_data['mr_Pays_list']).'",
+ "'.pSQL($mr_data['mr_ModeCol']).'",
+ "'.pSQL($mr_data['mr_ModeLiv']).'",
+ "'.pSQL($mr_data['mr_ModeAss']).'",
'.(int)($new_carrier->id).')');
}
}
-
+
/*
** Get a carrier list liable to the module
*/
public function _getCarriers()
{
- // Query don't use the external_module_name to keep the
- // 1.3 compatibility
+ // Query don't use the external_module_name to keep the
+ // 1.3 compatibility
$carriers = Db::getInstance()->executeS('
- SELECT
+ SELECT
c.id_carrier,
c.range_behavior,
m.id_mr_method,
m.mr_ModeLiv,
cl.delay
FROM `'._DB_PREFIX_.'mr_method` m
- LEFT JOIN `'._DB_PREFIX_.'carrier` c
+ LEFT JOIN `'._DB_PREFIX_.'carrier` c
ON c.`id_carrier` = m.`id_carrier`
- LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl
+ LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl
ON c.`id_carrier` = cl.`id_carrier`
WHERE c.`deleted` = 0
AND c.active = 1');
-
+
if (!is_array($carriers))
$carriers = array();
return $carriers;
}
-
+
public function hookextraCarrier($params)
- {
+ {
global $nbcarriers;
if (Configuration::get('MR_ENSEIGNE_WEBSERVICE') == '' ||
@@ -606,7 +615,7 @@ class MondialRelay extends Module
$id_zone = Address::getZoneById((int)($address->id));
//$country = new Country((int)($address->id_country));
$carriersList = self::_getCarriers();
-
+
// Check if the defined carrier are ok
foreach ($carriersList as $k => $row)
{
@@ -619,7 +628,7 @@ class MondialRelay extends Module
// Get id zone
$id_zone = (isset($this->context->cart->id_address_delivery) AND $this->context->cart->id_address_delivery) ?
Address::getZoneById((int)$this->context->cart->id_address_delivery) :
- (int)$this->context->country->id_zone;
+ (int)$this->context->country->id_zone;
if ((Configuration::get('PS_SHIPPING_METHOD') AND (!Carrier::checkDeliveryPriceByWeight($row['id_carrier'], $this->context->cart->getTotalWeight(), $id_zone))) OR
(!Configuration::get('PS_SHIPPING_METHOD') AND (!Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $this->context->cart->getOrderTotal(true, self::BOTH_WITHOUT_SHIPPING), $id_zone, $this->context->cart->id_currency))))
unset($carriersList[$k]);
@@ -635,14 +644,14 @@ class MondialRelay extends Module
'MRToken' => self::$MRFrontToken,
'carriersextra' => $carriersList,
'jQueryOverload' => self::getJqueryCompatibility()));
-
+
return $this->display(__FILE__, 'mondialrelay.tpl');
}
-
+
public function getContent()
- {
+ {
$error = null;
-
+
$html = '';
if (!empty($_POST))
{
@@ -658,18 +667,22 @@ class MondialRelay extends Module
$this->_html .= '';
}
}
-
+
if (isset($_GET['delete_mr']) && !empty($_GET['delete_mr']))
self::mrDelete((int)($_GET['delete_mr']));
$this->_html .= ''.$this->l('Configure Mondial Relay Rate Module').'
+
+ '.
+ $this->l('Try to turn off the cache and put the force compilation to on if you have any problems with the module after an update').'
+
'.$this->l('To create a Mondial Relay carrier').
'
- '.$this->l('Enter and save your Mondial Relay account settings').'
- '.$this->l('Create a Carrier using the form "add a carrier" below').'
- - '.$this->l('Define a price for your carrier on').'
+ - '.$this->l('Define a price for your carrier on').'
'.$this->l('The Carrier page').'
- '.$this->l('To generate labels, you must have a valid and registered address of your store on your').
@@ -694,23 +707,23 @@ class MondialRelay extends Module
' ';
return $this->_html;
}
-
+
/*
** Update the new defined fields of the merchant
*/
public function updateFieldsPersonalization()
{
Configuration::updateValue('PS_MR_SHOP_NAME', Tools::getValue('Expe_ad1'));
- $this->_html .= ' '.$this->l('Settings updated').'
';
+ $this->_html .= ' '.$this->l('Settings updated').'
';
}
-
+
public function mrDelete($id)
{
$id = Db::getInstance()->getValue('SELECT `id_carrier` FROM `'._DB_PREFIX_ .'mr_method` WHERE `id_mr_method` = "'.(int)($id).'"');
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_ .'carrier` SET `active` = 0, `deleted` = 1 WHERE `id_carrier` = "'.(int)($id).'"');
$this->_html .= ' '.$this->l('Delete successful').'
';
}
-
+
public function mrUpdate($type, $array, $keyArray)
{
if ($type == 'settings')
@@ -731,18 +744,18 @@ class MondialRelay extends Module
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'carrier SET active = "'.(int)($value).'" WHERE `id_carrier` = "'.(int)($id).'"');
}
}
- else if ($type == 'addShipping')
+ else if ($type == 'addShipping')
{
$query = 'INSERT INTO ' . _DB_PREFIX_ . 'mr_method (';
for ($q = 0; $q <= count($keyArray) - 1; $q++)
- {
+ {
$end = ($q == count($keyArray) - 1) ? '' : ', ';
$query .= $keyArray[$q] . $end;
}
-
+
$query .= ') VALUES(';
-
+
for ($j = 0; $j <= count($array) - 1; $j++)
{
$var = $array[$j];
@@ -754,7 +767,7 @@ class MondialRelay extends Module
$query .= ')';
Db::getInstance()->execute($query);
-
+
$mainInsert = Db::getInstance()->Insert_ID();
$default = Db::getInstance()->executeS("SELECT * FROM " . _DB_PREFIX_ . "configuration WHERE name = 'PS_CARRIER_DEFAULT'");
$check = Db::getInstance()->executeS("SELECT * FROM " . _DB_PREFIX_ . "carrier");
@@ -770,9 +783,9 @@ class MondialRelay extends Module
// Added for 1.3 compatibility to match with the right key
if (_PS_VERSION_ >= '1.4')
Db::getInstance()->execute('
- INSERT INTO `' . _DB_PREFIX_ . 'carrier`
+ INSERT INTO `' . _DB_PREFIX_ . 'carrier`
(`id_tax_rules_group`, `url`, `name`, `active`, `is_module`, `range_behavior`, `shipping_external`, `need_range`, `external_module_name`, `shipping_method`)
- VALUES("0", NULL, "'.pSQL($array[0]).'", "1", "1", "1", "0", "1", "mondialrelay", "1")');
+ VALUES("0", NULL, "'.pSQL($array[1]).'", "1", "1", "1", "0", "1", "mondialrelay", "1")');
else
Db::getInstance()->execute('
INSERT INTO `' . _DB_PREFIX_ . 'carrier`
@@ -790,7 +803,7 @@ class MondialRelay extends Module
foreach ($groups as $group)
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'carrier_group` (id_carrier, id_group) VALUES('.(int)($get['id_carrier']).', '.(int)($group['id_group']).')');
-
+
$zones = Zone::getZones();
foreach ($zones as $zone)
{
@@ -800,22 +813,23 @@ class MondialRelay extends Module
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'delivery` (id_carrier, id_range_price, id_range_weight, id_zone, price) VALUES('.(int)($get['id_carrier']).', '.(int)($range_price_id).', NULL,'.(int)($zone['id_zone']).', 0.00)');
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'delivery` (id_carrier, id_range_price, id_range_weight, id_zone, price) VALUES('.(int)($get['id_carrier']).', NULL, '.(int)($range_weight_id).','.(int)($zone['id_zone']).', 0.00)');
}
-
+
if(!in_array($default[0]['value'], $checkD))
$default = Db::getInstance()->executeS("UPDATE " . _DB_PREFIX_ . "configuration SET value = '" . (int)($get['id_carrier']) . "' WHERE name = 'PS_CARRIER_DEFAULT'");
}
- else
+ else
return false;
$this->_html .= ' '.$this->l('Settings updated').'
';
return true;
}
-
+
public function addMethodForm()
{
$zones = Db::getInstance()->executeS("SELECT * FROM " . _DB_PREFIX_ . "zone WHERE active = 1");
$output = '
';
-
+
return $output;
}
-
+
public function shippingForm()
{
$query = Db::getInstance()->executeS('
SELECT m.*
FROM `'._DB_PREFIX_.'mr_method` m
- JOIN `'._DB_PREFIX_.'carrier` c
+ JOIN `'._DB_PREFIX_.'carrier` c
ON (c.`id_carrier` = m.`id_carrier`)
WHERE c.`deleted` = 0');
-
+
$output = '
';
- return $output;
+ return $output;
}
-
+
/*
** Display advanced settings form
*/
public function advancedSettings()
{
$form = '';
-
+
$form .= '
- '.$this->l('Advanced Settings'). ' -
+ '.$this->l('Advanced Settings'). ' -
'.$this->l('Click to display / hide the options').'
'.
@@ -934,9 +947,9 @@ class MondialRelay extends Module
'
';
- return $form;
+ return $form;
}
-
+
/*
** Form to allow personalization fields sent for MondialRelay
** Not used anymore but still present if needed
@@ -945,27 +958,27 @@ class MondialRelay extends Module
{
$form = '';
$warn = '';
-
+
// Load the Default value from the configuration
- $addr1 = (Configuration::get('PS_MR_SHOP_NAME')) ?
- Configuration::get('PS_MR_SHOP_NAME') :
+ $addr1 = (Configuration::get('PS_MR_SHOP_NAME')) ?
+ Configuration::get('PS_MR_SHOP_NAME') :
Configuration::get('PS_SHOP_NAME');
-
+
// Check if a request exist and if errors occured, use the post variable
if (Tools::isSubmit('PS_MRSubmitFieldPersonalization') && count($this->_postErrors))
$addr1 = Tools::safeOutput(Tools::getValue('Expe_ad1'));
-
+
if (!Configuration::get('PS_MR_SHOP_NAME'))
$warn .= ''.
$this->l('Its seems you updated Mondialrelay without use the uninstall / install method, you have to set up this part to make working the generating ticket process').
- '
';
+ '';
// Form
$form = ' ';
return $form;
}
-
-
+
+
public function settingsstateorderForm()
{
$this->orderState = Configuration::get('MONDIAL_RELAY_ORDER_STATE');
@@ -1015,11 +1028,11 @@ class MondialRelay extends Module
';
$output .= '
';
$output .= ' ';
-
+
return $output;
}
-
+
public function settingsForm()
{
$output = '
@@ -1055,15 +1068,15 @@ class MondialRelay extends Module
$languages = Language::getLanguages();
foreach ($languages as $language)
$output .= ''.$language['name'].' ';
-
+
$output .= '
' . $this->l('Weight Coefficient:') . '*
-
(' . $this->l('grammes = 1 ') . Configuration::get('PS_WEIGHT_UNIT').')
-
+
@@ -1078,12 +1091,12 @@ class MondialRelay extends Module
{
$html = '';
$simpleresul = Db::getInstance()->executeS('
- SELECT * FROM ' . _DB_PREFIX_ . 'mr_selected
+ SELECT * FROM ' . _DB_PREFIX_ . 'mr_selected
WHERE id_cart='.(int)($id_cart));
-
- if (trim($simpleresul[0]['exp_number']) != '0')
+
+ if (trim($simpleresul[0]['exp_number']) != '0')
$html .= $this->l('Nb expedition:').$simpleresul[0]['exp_number']." ";
- if (trim($simpleresul[0]['url_etiquette']) != '0')
+ if (trim($simpleresul[0]['url_etiquette']) != '0')
$html .= "".$this->l('Label URL')." ";
if (trim($simpleresul[0]['url_suivi']) != '0')
$html .= "".$this->l('Follow-up URL')." ";
@@ -1094,9 +1107,9 @@ class MondialRelay extends Module
if (trim($simpleresul[0]['MR_Selected_LgAdr2']) != '')
$html .= $simpleresul[0]['MR_Selected_LgAdr2']." ";
if (trim($simpleresul[0]['MR_Selected_LgAdr3']) != '')
- $html .= $simpleresul[0]['MR_Selected_LgAdr3']." ";
+ $html .= $simpleresul[0]['MR_Selected_LgAdr3']." ";
if (trim($simpleresul[0]['MR_Selected_LgAdr4']) != '')
- $html .= $simpleresul[0]['MR_Selected_LgAdr4']." ";
+ $html .= $simpleresul[0]['MR_Selected_LgAdr4']." ";
if (trim($simpleresul[0]['MR_Selected_CP']) != '')
$html .= $simpleresul[0]['MR_Selected_CP']." ";
if (trim($simpleresul[0]['MR_Selected_Ville']) != '')
@@ -1109,12 +1122,12 @@ class MondialRelay extends Module
public function get_followup($shipping_number)
{
- $query = 'SELECT url_suivi
- FROM '._DB_PREFIX_ .'mr_selected
+ $query = 'SELECT url_suivi
+ FROM '._DB_PREFIX_ .'mr_selected
WHERE id_mr_selected=\''.(int)($shipping_number).'\';';
-
+
$settings = Db::getInstance()->executeS($query);
-
+
return $settings[0]['url_suivi'];
}
@@ -1122,26 +1135,26 @@ class MondialRelay extends Module
{
if ($key == 'name')
$key = 'mr_Name';
-
+
return Db::getInstance()->execute('
- UPDATE ' . _DB_PREFIX_ . 'mr_method
- SET '.pSQL($key).'="'.pSQL($value).'"
+ UPDATE ' . _DB_PREFIX_ . 'mr_method
+ SET '.pSQL($key).'="'.pSQL($value).'"
WHERE id_carrier=\''.(int)($id_carrier).'\' ; ');
}
-
- // Add for 1.3 compatibility and avoid duplicate code
+
+ // Add for 1.3 compatibility and avoid duplicate code
public static function jsonEncode($result)
{
- return (method_exists('Tools', 'jsonEncode')) ?
+ return (method_exists('Tools', 'jsonEncode')) ?
Tools::jsonEncode($result) : json_encode($result);
}
-
+
public static function ordersSQLQuery1_4($id_order_state)
{
- return 'SELECT o.`id_address_delivery` as id_address_delivery,
- o.`id_order` as id_order,
+ return 'SELECT o.`id_address_delivery` as id_address_delivery,
+ o.`id_order` as id_order,
o.`id_customer` as id_customer,
- o.`id_cart` as id_cart,
+ o.`id_cart` as id_cart,
o.`id_lang` as id_lang,
mrs.`id_mr_selected` as id_mr_selected,
CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`,
@@ -1149,57 +1162,57 @@ class MondialRelay extends Module
o.`date_add` as date, o.`id_currency` as id_currency, o.`id_lang` as id_lang,
mrs.`MR_poids` as weight, mr.`mr_Name` as mr_Name, mrs.`MR_Selected_Num` as MR_Selected_Num,
mrs.`MR_Selected_Pays` as MR_Selected_Pays, mrs.`exp_number` as exp_number,
- mr.`mr_ModeCol` as mr_ModeCol, mr.`mr_ModeLiv` as mr_ModeLiv, mr.`mr_ModeAss` as mr_ModeAss
+ mr.`mr_ModeCol` as mr_ModeCol, mr.`mr_ModeLiv` as mr_ModeLiv, mr.`mr_ModeAss` as mr_ModeAss
FROM `'._DB_PREFIX_.'orders` o
- LEFT JOIN `'._DB_PREFIX_.'carrier` ca
- ON (ca.`id_carrier` = o.`id_carrier`
+ LEFT JOIN `'._DB_PREFIX_.'carrier` ca
+ ON (ca.`id_carrier` = o.`id_carrier`
AND ca.`external_module_name` = "mondialrelay")
- LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
+ LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
ON (mrs.`id_cart` = o.`id_cart`)
- LEFT JOIN `'._DB_PREFIX_.'mr_method` mr
+ LEFT JOIN `'._DB_PREFIX_.'mr_method` mr
ON (mr.`id_carrier` = ca.`id_carrier`)
- LEFT JOIN `'._DB_PREFIX_.'customer` c
+ LEFT JOIN `'._DB_PREFIX_.'customer` c
ON (c.`id_customer` = o.`id_customer`)
WHERE (
- SELECT moh.`id_order_state`
- FROM `'._DB_PREFIX_.'order_history` moh
- WHERE moh.`id_order` = o.`id_order`
- ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state).'
+ SELECT moh.`id_order_state`
+ FROM `'._DB_PREFIX_.'order_history` moh
+ WHERE moh.`id_order` = o.`id_order`
+ ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state).'
AND ca.`external_module_name` = "mondialrelay"';
}
-
+
public static function ordersSQLQuery1_3($id_order_state)
{
return '
- SELECT o.`id_address_delivery` as id_address_delivery,
- o.`id_order` as id_order,
+ SELECT o.`id_address_delivery` as id_address_delivery,
+ o.`id_order` as id_order,
o.`id_customer` as id_customer,
- o.`id_cart` as id_cart,
+ o.`id_cart` as id_cart,
mrs.`id_mr_selected` as id_mr_selected,
CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`,
o.`total_paid_real` as total, o.`total_shipping` as shipping,
o.`date_add` as date, o.`id_currency` as id_currency, o.`id_lang` as id_lang,
mrs.`MR_poids` as weight, mr.`mr_Name` as mr_Name, mrs.`MR_Selected_Num` as MR_Selected_Num,
mrs.`MR_Selected_Pays` as MR_Selected_Pays, mrs.`exp_number` as exp_number,
- mr.`mr_ModeCol` as mr_ModeCol, mr.`mr_ModeLiv` as mr_ModeLiv, mr.`mr_ModeAss` as mr_ModeAss
+ mr.`mr_ModeCol` as mr_ModeCol, mr.`mr_ModeLiv` as mr_ModeLiv, mr.`mr_ModeAss` as mr_ModeAss
FROM `'._DB_PREFIX_.'orders` o
- LEFT JOIN `'._DB_PREFIX_.'carrier` ca
+ LEFT JOIN `'._DB_PREFIX_.'carrier` ca
ON (ca.`id_carrier` = o.`id_carrier`)
AND ca.`name` = "mondialrelay"
- LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
+ LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs
ON (mrs.`id_cart` = o.`id_cart`)
- LEFT JOIN `'._DB_PREFIX_.'mr_method` mr
+ LEFT JOIN `'._DB_PREFIX_.'mr_method` mr
ON (mr.`id_carrier` = ca.`id_carrier`)
- LEFT JOIN `'._DB_PREFIX_.'customer` c
+ LEFT JOIN `'._DB_PREFIX_.'customer` c
ON (c.`id_customer` = o.`id_customer`)
WHERE (
- SELECT moh.`id_order_state`
- FROM `'._DB_PREFIX_.'order_history` moh
- WHERE moh.`id_order` = o.`id_order`
+ SELECT moh.`id_order_state`
+ FROM `'._DB_PREFIX_.'order_history` moh
+ WHERE moh.`id_order` = o.`id_order`
ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state).'
AND ca.`name` = "mondialrelay"';
}
-
+
public static function getBaseOrdersSQLQuery($id_order_state)
{
if (_PS_VERSION_ >= '1.4')
@@ -1207,12 +1220,12 @@ class MondialRelay extends Module
else
return self::ordersSQLQuery1_3($id_order_state);
}
-
+
public static function getOrders($orderIdList = array(), $filterEntries = self::NO_FILTER)
{
$id_order_state = Configuration::get('MONDIAL_RELAY_ORDER_STATE');
$sql = self::getBaseOrdersSQLQuery($id_order_state);
-
+
if (count($orderIdList))
{
$sql .= ' AND o.id_order IN (';
@@ -1233,11 +1246,11 @@ class MondialRelay extends Module
ORDER BY o.`date_add` ASC';
return Db::getInstance()->executeS($sql);
}
-
+
public function getErrorCodeDetail($code)
{
global $statCode;
-
+
if (isset($statCode[$code]))
return $statCode[$code];
return $this->l('This error isn\'t referred : ') . $code;
diff --git a/modules/mondialrelay/mondialrelay.tpl b/modules/mondialrelay/mondialrelay.tpl
index e86e1904c..46fa38449 100755
--- a/modules/mondialrelay/mondialrelay.tpl
+++ b/modules/mondialrelay/mondialrelay.tpl
@@ -40,6 +40,8 @@
PS_MRTranslationList['Select'] = "{l s='Select' mod='mondialrelay'}";
PS_MRTranslationList['Selected'] = "{l s='Selected' mod='mondialrelay'}";
PS_MRTranslationList['errorSelection'] = "{l s='Please choose a relay point' mod='mondialrelay'}";
+ PS_MRTranslationList['openingRelay'] = "{l s='Opening hours' mod='mondialrelay'}";
+ PS_MRTranslationList['moreDetails'] = "{l s='More details' mod='mondialrelay'}";
diff --git a/modules/mondialrelay/style.css b/modules/mondialrelay/style.css
index f114ed7df..934b5e7a5 100755
--- a/modules/mondialrelay/style.css
+++ b/modules/mondialrelay/style.css
@@ -96,8 +96,7 @@ div#PS_MRUnRemovedItem
}
.shippingList {
- width: 400px;
- float: right;
+
}
.shippingList li {
margin: 5px;
@@ -326,3 +325,18 @@ div#PS_MRPersonalizedFields
}
.clearfix:after {clear: both}
.clearfix {zoom: 1}
+
+.PS_MRGmapBulbe
+{
+ width:405px;
+ height:66px;
+ overflow: hidden;
+}
+
+.MR_date {width:450px;position:relative;float:right; line-height: 9px;}
+.MR_date span.titre {margin-left:50px;font-weight:bold;}
+.MR_date span.vacances {margin-left:5px;color:Red; }
+.MR_date table {border-spacing:3px;font-size:11pt; border: solid 1px #eee;}
+.MR_date tr.p {background-color:#e9e9e9; height:9px;}
+.MR_date td.g {font-weight:bold;}
+.MR_date td.d {}
diff --git a/modules/socolissimo/ajax.php b/modules/socolissimo/ajax.php
index ffdad3f45..5df8afef9 100644
--- a/modules/socolissimo/ajax.php
+++ b/modules/socolissimo/ajax.php
@@ -4,14 +4,16 @@ include_once('../../config/config.inc.php');
include_once('../../init.php');
include_once('../../modules/socolissimo/socolissimo.php');
-if (!Tools::getValue('ajax'))
- die('');
-
+global $cookie;
+
+if (Tools::getValue('token') == sha1('socolissimo'._COOKIE_KEY_.$cookie->id_cart))
+ die('INVALID TOKEN');
+
$socolissimo = new Socolissimo();
-
$result = $socolissimo->getDeliveryInfos(Context::getContext()->cart->id, Context::getContext()->customer->id);
if (!$result)
die('{"result" : false}');
else
die('{"result" : true}');
+
?>
\ No newline at end of file
diff --git a/modules/socolissimo/config.xml b/modules/socolissimo/config.xml
index e8508f088..8f0d496af 100755
--- a/modules/socolissimo/config.xml
+++ b/modules/socolissimo/config.xml
@@ -2,7 +2,7 @@
socolissimo
-
+
diff --git a/modules/socolissimo/redirect.php b/modules/socolissimo/redirect.php
index 610dfd2cc..d29d66027 100644
--- a/modules/socolissimo/redirect.php
+++ b/modules/socolissimo/redirect.php
@@ -27,13 +27,15 @@
require_once ('../../config/config.inc.php');
+$onload_script = 'parent.$.fancybox.close();';
+if (Tools::isSubmit('firstcall'))
+ $onload_script = 'document.getElementById(\'socoForm\').submit();';
?>
-
-
+
';
foreach($_GET as $key => $val)
diff --git a/modules/socolissimo/socolissimo.php b/modules/socolissimo/socolissimo.php
index e11e1c5d8..fd811faaa 100644
--- a/modules/socolissimo/socolissimo.php
+++ b/modules/socolissimo/socolissimo.php
@@ -57,7 +57,7 @@ class Socolissimo extends CarrierModule
{
$this->name = 'socolissimo';
$this->tab = 'shipping_logistics';
- $this->version = '2.0';
+ $this->version = '2.1';
$this->author = 'PrestaShop';
$this->limited_countries = array('fr');
@@ -109,8 +109,8 @@ class Socolissimo extends CarrierModule
if (!parent::install() OR !Configuration::updateValue('SOCOLISSIMO_ID', NULL) OR !Configuration::updateValue('SOCOLISSIMO_KEY', NULL)
OR !Configuration::updateValue('SOCOLISSIMO_URL', 'https://ws.colissimo.fr/pudo-fo/storeCall.do') OR !Configuration::updateValue('SOCOLISSIMO_PREPARATION_TIME', 1)
OR !Configuration::updateValue('SOCOLISSIMO_OVERCOST', 3.6) OR !$this->registerHook('extraCarrier') OR !$this->registerHook('AdminOrder') OR !$this->registerHook('updateCarrier')
- OR !$this->registerHook('newOrder') OR !Configuration::updateValue('SOCOLISSIMO_SUP_URL', 'http://ws.colissimo.fr/supervision-pudo/supervision.jsp')
- OR !Configuration::updateValue('SOCOLISSIMO_SUP', true))
+ OR !$this->registerHook('newOrder') OR !$this->registerHook('paymentTop') OR !Configuration::updateValue('SOCOLISSIMO_SUP_URL', 'http://ws.colissimo.fr/supervision-pudo/supervision.jsp')
+ OR !Configuration::updateValue('SOCOLISSIMO_SUP', true) OR !Configuration::updateValue('SOCOLISSIMO_USE_FANCYBOX', true))
return false;
@@ -159,7 +159,9 @@ class Socolissimo extends CarrierModule
OR !$this->unregisterHook('AdminOrder')
OR !$this->unregisterHook('newOrder')
OR !$this->unregisterHook('updateCarrier')
+ OR !$this->unregisterHook('paymentTop')
OR !Configuration::deleteByName('SOCOLISSIMO_ID')
+ OR !Configuration::deleteByName('SOCOLISSIMO_USE_FANCYBOX')
OR !Configuration::deleteByName('SOCOLISSIMO_KEY')
OR !Configuration::deleteByName('SOCOLISSIMO_URL')
OR !Configuration::deleteByName('SOCOLISSIMO_OVERCOST')
@@ -270,6 +272,15 @@ class Socolissimo extends CarrierModule
' . $this->l('Url of back office SoColissimo.') . '
+ '.$this->l('Fancybox').' :
+
+
'.$this->l('Supervision').' :
@@ -334,6 +345,7 @@ class Socolissimo extends CarrierModule
AND Configuration::updateValue('SOCOLISSIMO_OVERCOST', (float)(Tools::getValue('overcost')))
AND Configuration::updateValue('SOCOLISSIMO_SUP_URL', Tools::getValue('url_sup'))
AND Configuration::updateValue('SOCOLISSIMO_OVERCOST_TAX', Tools::getValue('id_tax_rules_group'))
+ AND Configuration::updateValue('SOCOLISSIMO_USE_FANCYBOX', Tools::getValue('SOCOLISSIMO_USE_FANCYBOX'))
AND Configuration::updateValue('SOCOLISSIMO_SUP', (int)(Tools::getValue('sup_active'))))
{
//save old carrier id if change
@@ -378,7 +390,10 @@ class Socolissimo extends CarrierModule
'CETOWN' => substr($this->upper($params['address']->city),0,32),
'DYWEIGHT' => ((float)($params['cart']->getTotalWeight()) * 1000),
'SIGNATURE' => htmlentities($signature,ENT_NOQUOTES, 'UTF-8'),
- 'TRPARAMPLUS' => (int)($carrierSo->id),
+ 'carrier_id' => (int)($carrierSo->id),
+ 'gift' => '',
+ 'gift_message' => '',
+ 'TRPARAMPLUS' => '',
'DYFORWARDINGCHARGES' => number_format((float)($params['cart']->getOrderShippingCost($carrierSo->id)), 2, ',', ''),
'DYPREPARATIONTIME' => (int)(Configuration::Get('SOCOLISSIMO_PREPARATION_TIME')),
'TRRETURNURLKO' => htmlentities($this->url,ENT_NOQUOTES, 'UTF-8'),
@@ -389,16 +404,25 @@ class Socolissimo extends CarrierModule
$serialsInput .= '&'.$key.'='.$val;
$serialsInput = ltrim($serialsInput, '&');
$row['id_carrier'] = (int)($carrierSo->id);
- $this->context->smarty->assign(array('urlSo' => Configuration::get('SOCOLISSIMO_URL').'?trReturnUrlKo='.htmlentities($this->url,ENT_NOQUOTES, 'UTF-8'),'id_carrier' => (int)($row['id_carrier']),
- 'inputs' => $inputs, 'serialsInput' => $serialsInput, 'finishProcess' => $this->l('To choose SoColissimo, click on a delivery method')));
+
+ $this->context->smarty->assign(array(
+ 'select_label' => $this->l('Select delivery mode'),
+ 'edit_label' => $this->l('Edit delivery mode'),
+ 'token' => sha1('socolissimo'._COOKIE_KEY_.$cookie->id_cart),
+ 'urlSo' => Configuration::get('SOCOLISSIMO_URL').'?trReturnUrlKo='.htmlentities($this->url,ENT_NOQUOTES, 'UTF-8'),
+ 'id_carrier' => (int)$row['id_carrier'],
+ 'inputs' => $inputs, 'serialsInput' => $serialsInput, 'finishProcess' => $this->l('To choose SoColissimo, click on a delivery method'),
+ ));
$country = new Country((int)($params['address']->id_country));
- $carriers = Carrier::getCarriers($this->context->language->id, true , false,false, NULL, Carrier::ALL_CARRIERS);
+
+ $carriers = Carrier::getCarriers($this->context->language->id, true , false, false, null, (defined('ALL_CARRIERS') ? ALL_CARRIERS : Carrier::ALL_CARRIERS));
+
$ids = array();
foreach($carriers as $carrier)
$ids[] = $carrier['id_carrier'];
- if ($this->getDeliveryInfos($this->context->cart->id, $this->context->customer->id))
+ if ($params['cart']->id_carrier == Configuration::Get('SOCOLISSIMO_CARRIER_ID') && $this->getDeliveryInfos($this->context->cart->id, $this->context->customer->id))
$this->context->smarty->assign('already_select_delivery', true);
else
$this->context->smarty->assign('already_select_delivery', false);
@@ -408,7 +432,10 @@ class Socolissimo extends CarrierModule
AND $this->checkSoCarrierAvailable((int)(Configuration::get('SOCOLISSIMO_CARRIER_ID')))
AND in_array((int)(Configuration::get('SOCOLISSIMO_CARRIER_ID')),$ids))
{
- return $this->display(__FILE__, 'socolissimo_carrier.tpl');
+ if (Configuration::get('PS_ORDER_PROCESS_TYPE') || Configuration::get('SOCOLISSIMO_USE_FANCYBOX'))
+ return $this->display(__FILE__, 'socolissimo_fancybox.tpl');
+ else
+ return $this->display(__FILE__, 'socolissimo_redirect.tpl');
}
else
{
@@ -497,6 +524,12 @@ class Socolissimo extends CarrierModule
}
+ public function hookpaymentTop($params)
+ {
+ if ($params['cart']->id_carrier == Configuration::Get('SOCOLISSIMO_CARRIER_ID') AND !$this->getDeliveryInfos((int)$params['cookie']->id_cart, (int)$params['cookie']->id_customer))
+ $params['cart']->id_carrier = 0;
+ }
+
public function make_key($ceName, $dyPraparationTime, $dyForwardingCharges, $trClientNumber, $orderId)
{
return sha1(Configuration::get('SOCOLISSIMO_ID').$ceName.$dyPraparationTime.$dyForwardingCharges.$trClientNumber.self::formatOrderId($orderId).Configuration::get('SOCOLISSIMO_KEY'));
diff --git a/modules/socolissimo/socolissimo_fancybox.tpl b/modules/socolissimo/socolissimo_fancybox.tpl
new file mode 100755
index 000000000..9f539aa3d
--- /dev/null
+++ b/modules/socolissimo/socolissimo_fancybox.tpl
@@ -0,0 +1,182 @@
+{*
+* 2007-2011 PrestaShop
+*
+* NOTICE OF LICENSE
+*
+* This source file is subject to the Academic Free License (AFL 3.0)
+* that is bundled with this package in the file LICENSE.txt.
+* It is also available through the world-wide-web at this URL:
+* http://opensource.org/licenses/afl-3.0.php
+* If you did not receive a copy of the license and are unable to
+* obtain it through the world-wide-web, please send an email
+* to license@prestashop.com so we can send you a copy immediately.
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+* versions in the future. If you wish to customize PrestaShop for your
+* needs please refer to http://www.prestashop.com for more information.
+*
+* @author PrestaShop SA
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6735 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+{if isset($opc) && $opc}
+
+{else}
+
+{/if}
+{if isset($already_select_delivery) && $already_select_delivery}
+
+{else}
+
+{/if}
+
\ No newline at end of file
diff --git a/modules/socolissimo/socolissimo_redirect.tpl b/modules/socolissimo/socolissimo_redirect.tpl
new file mode 100755
index 000000000..4b17f1a81
--- /dev/null
+++ b/modules/socolissimo/socolissimo_redirect.tpl
@@ -0,0 +1,46 @@
+{*
+* 2007-2011 PrestaShop
+*
+* NOTICE OF LICENSE
+*
+* This source file is subject to the Academic Free License (AFL 3.0)
+* that is bundled with this package in the file LICENSE.txt.
+* It is also available through the world-wide-web at this URL:
+* http://opensource.org/licenses/afl-3.0.php
+* If you did not receive a copy of the license and are unable to
+* obtain it through the world-wide-web, please send an email
+* to license@prestashop.com so we can send you a copy immediately.
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+* versions in the future. If you wish to customize PrestaShop for your
+* needs please refer to http://www.prestashop.com for more information.
+*
+* @author PrestaShop SA
+* @copyright 2007-2011 PrestaShop SA
+* @version Release: $Revision: 6735 $
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+{foreach from=$inputs item=input key=name name=myLoop}
+
+{/foreach}
diff --git a/modules/socolissimo/validation.php b/modules/socolissimo/validation.php
index f00eb7c30..dd7e3d2c4 100644
--- a/modules/socolissimo/validation.php
+++ b/modules/socolissimo/validation.php
@@ -1,6 +1,6 @@
$val)
if (in_array(strtoupper($key),$validReturn))
$return[strtoupper($key)] = utf8_encode(urldecode(stripslashes($val)));
-
+
if (isset($return['SIGNATURE']) AND isset($return['CENAME']) AND isset($return['DYPREPARATIONTIME']) AND isset($return['DYFORWARDINGCHARGES']) AND isset($return['TRCLIENTNUMBER']) AND isset($return['ORDERID']) AND isset($return['TRCLIENTNUMBER']))
{
if (!isset($return['ERRORCODE']) OR $return['ERRORCODE'] == NULL OR in_array($return['ERRORCODE'],$nonBlockingError))
- {
-
+ {
+
if ($return['SIGNATURE'] === socolissimo::make_key($return['CENAME'],(float)($return['DYPREPARATIONTIME']),$return['DYFORWARDINGCHARGES'],$return['TRCLIENTNUMBER'], $return['ORDERID']))
{
if (Context::getContext()->cart->id)
{
if (saveOrderShippingDetails(Context::getContext()->cart->id,(int)($return['TRCLIENTNUMBER']),$return))
- {
- Context::getContext()->cart->id_carrier = (int)($_POST['TRPARAMPLUS']);
- if (!Context::getContext()->cart->update())
+ {
+ $cart = Context::getContext()->cart;
+ $TRPARAMPLUS = explode('|', Tools::getValue('TRPARAMPLUS'));
+ $cart->id_carrier = $TRPARAMPLUS[0];
+ $cart->gift = (int)$TRPARAMPLUS[1];
+ if ((int)$cart->gift)
+ if (Validate::isMessage($TRPARAMPLUS[2]))
+ $cart->gift_message = strip_tags($TRPARAMPLUS[2]);
+
+ if (!$cart->update())
Tools::redirect();
else
Tools::redirect('index.php?controller=order&step=3');
@@ -81,7 +88,7 @@ if (isset($return['SIGNATURE']) AND isset($return['CENAME']) AND isset($return['
echo ' '.$so->displaySoError('999').': ';
$errors = explode(',', str_replace('+',',', $return['ERRORCODE']));
foreach($errors as $error)
- echo $so->displaySoError(rtrim($error));
+ echo $so->displaySoError(rtrim($error));
echo '
« Retour
'; }
@@ -98,15 +105,15 @@ function saveOrderShippingDetails($idCart, $idCustomer, $soParams)
'A2P' => 'Livraison Commerce de proximité', 'MRL' => 'Livraison Commerce de proximité',
'CIT' => 'Livraison en Cityssimo', 'ACP' => 'Agence ColiPoste', 'CDI' => 'Centre de distribution',
'RDV' => 'Livraison sur Rendez-vous');
-
+
$db = Db::getInstance();
$db->executeS('SELECT * FROM '._DB_PREFIX_.'socolissimo_delivery_info WHERE id_cart = '.(int)($idCart).' AND id_customer ='.(int)($idCustomer));
$numRows = (int)($db->NumRows());
if ($numRows == 0)
- {
+ {
$sql = 'INSERT INTO '._DB_PREFIX_.'socolissimo_delivery_info
- ( `id_cart`, `id_customer`, `delivery_mode`, `prid`, `prname`, `prfirstname`, `prcompladress`,
- `pradress1`, `pradress2`, `pradress3`, `pradress4`, `przipcode`, `prtown`, `cephonenumber`, `ceemail` , `cecompanyname`, `cedeliveryinformation`, `cedoorcode1`, `cedoorcode2`)
+ ( `id_cart`, `id_customer`, `delivery_mode`, `prid`, `prname`, `prfirstname`, `prcompladress`,
+ `pradress1`, `pradress2`, `pradress3`, `pradress4`, `przipcode`, `prtown`, `cephonenumber`, `ceemail` , `cecompanyname`, `cedeliveryinformation`, `cedoorcode1`, `cedoorcode2`)
VALUES ('.(int)($idCart).','.(int)($idCustomer).',';
if ($soParams['DELIVERYMODE'] != 'DOM' AND $soParams['DELIVERYMODE'] != 'RDV')
$sql .= '\''.pSQL($soParams['DELIVERYMODE']).'\''.',
@@ -144,11 +151,11 @@ function saveOrderShippingDetails($idCart, $idCustomer, $soParams)
'.(isset($soParams['CEDOORCODE1']) ? '\''.pSQL($soParams['CEDOORCODE1']).'\'' : '\'\'').',
'.(isset($soParams['CEDOORCODE2']) ? '\''.pSQL($soParams['CEDOORCODE2']).'\'' : '\'\'').')';
- if (Db::getInstance()->execute($sql))
+ if (Db::getInstance()->execute($sql))
return true;
}
else
- {
+ {
$table = _DB_PREFIX_.'socolissimo_delivery_info';
$values = array();
$values['delivery_mode'] = pSQL($soParams['DELIVERYMODE']);
@@ -174,6 +181,7 @@ function saveOrderShippingDetails($idCart, $idCustomer, $soParams)
}
else
{
+ (isset($soParams['PRID']) ? $values['prid'] = pSQL($soParams['PRID']) : $values['prid'] = '');
(isset($soParams['CENAME']) ? $values['prname'] = ucfirst(pSQL($soParams['CENAME'])) : '');
(isset($soParams['CEFIRSTNAME']) ? $values['prfirstname'] = ucfirst(pSQL($soParams['CEFIRSTNAME'])) : '');
(isset($soParams['CECOMPLADRESS']) ? $values['prcompladress'] = pSQL($soParams['CECOMPLADRESS']) : '');
@@ -191,11 +199,8 @@ function saveOrderShippingDetails($idCart, $idCustomer, $soParams)
(isset($soParams['CECOMPANYNAME']) ? $values['cecompanyname'] = pSQL($soParams['CECOMPANYNAME']) : '');
}
$where = ' `id_cart` =\''.(int)($idCart).'\' AND `id_customer` =\''.(int)($idCustomer).'\'';
-
+
if (Db::getInstance()->autoExecute($table, $values, 'UPDATE', $where))
return true;
}
}
-
-
-
diff --git a/modules/upscarrier/carrier.jpg b/modules/upscarrier/carrier.jpg
index 5a84f12d4..02c3ad739 100644
Binary files a/modules/upscarrier/carrier.jpg and b/modules/upscarrier/carrier.jpg differ
diff --git a/modules/uspscarrier/fr.php b/modules/uspscarrier/fr.php
index fafc2c926..e8ba2ecb6 100644
--- a/modules/uspscarrier/fr.php
+++ b/modules/uspscarrier/fr.php
@@ -2,20 +2,21 @@
global $_MODULE;
$_MODULE = array();
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_ec6bd501021318b872a9eddd897a9cc2'] = 'Calcul des frais U.S.P.S';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_098087ab799def1028233142cafeeafd'] = 'Propose à vos clients le transporteur USPS (US Postal)';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_d7897df448ce113a0205078a9255f7b7'] = 'Transporteur USPS';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_660e7e160b8b390f9d36f6886cbeaa9d'] = 'Calculer les frais de transport pour USPS (United States Postal Service)';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_883fa0069f4b0454e2277dd567ab3991'] = '\'Unité de poids (LB ou KG)\'';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_5a3ceec65d417f5d92c26dbf0dccc00d'] = '\'Unité de mesure (CM ou IN)\'';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_4d470fde8487e755a50e9235e3dc13ab'] = 'doit être configuré pour fonctionner correctement';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_d2d22fe4f85d971b090bcbacec8f0123'] = 'USPS User ID';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_813c2f71e65f4cd51a9c529ee2dd7efe'] = 'Zip code';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_20449d3f0b6c6b9265a5cd2a470a6451'] = 'Poids du colis';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_bfc00de34bc04366e7fee516adf7dca5'] = 'Frais supplémentaire';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_761c02f2b956cac5abe5539c6d908508'] = 'La taille des paquets USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_ca9df8a12e7558c34bcf7b88aab5cba5'] = 'Le type de paquet USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f347d2e6d32688d9174b7aa1fc0124b1'] = 'Cela peut il être traité par une machine';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_abca8ad9739957246c02470f31f040e0'] = 'Mode de calcul';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_d2203cb1237cb6460cbad94564e39345'] = 'Regular';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_3a69b34ce86dacb205936a8094f6c743'] = 'Large';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_5c5f284bdf0e24e2b65a151660b4aa95'] = 'Oversize';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_47c14840d8e15331fa420b9b2f757cd9'] = 'Variable';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_8c2647c84442d515b68c6fdba7d4fb25'] = 'Flat rate box';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_d3d3b81729b689260abfd1b21de630ea'] = 'MD flat rate box';
@@ -28,12 +29,12 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_f8320b26d30ab433c5a54546d21f414c'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f827cf462f62848df37c5e1e94a4da74'] = 'True';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_386aad80d82f8245e9ef80352a2240e8'] = 'Tous les articles en un seul paquet';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f35eb2a913a3fd6fd8e661012cf0ebd8'] = 'Découper un article par paquet';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_5947e2ae63c0a33524cf81c44a1db580'] = 'Transporteur USPS';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_3a3a3ea18546ae6529e6e439a97b040a'] = 'Calculateur de frais de port USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f57cff5425b6e64843c5f066c5b310d0'] = 'Statut du module USPS';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_09bdd414ce843927aa3dceadc8bce034'] = 'Le transporteur USPS est fonctionnel !';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_ec8b84c83dfee20afa4c2f35245a254b'] = 'Le transporteur USPS n\'est pas encore complètement configuré, vous devez :';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_3e203b9a16f360b88d90bba6eb61ce61'] = 'Remplir le formulaire \"Configuration Générale\"';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_8c0987b9315003df7dae7f130e3cf58e'] = 'Choississez vos services de livraison';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_2923c2caf8d0b17f409e66e798ea94cf'] = 'Le module USPS est configuré et activé :';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_82d36b7a513a66cfdcede4d0b56ba36e'] = 'Le module USPS n\'est pas configuré, vous devez :';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_15507d23c7b911b14ebd95a9a0e12560'] = 'Remplir le champs User ID et zip code d\'origine sur le formulaire \"Configuration Générale\"';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_5ea70d7b669a7e15e6d402bd423aa56e'] = 'Selectionnez vos services de livraison';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_e20f6d6f13fe70e78f6e2ab488493ccf'] = 'Test de connection webservices';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_d5377c8cc8c83b501472660c69f694e8'] = 'cURL extension n\'est pas activée, le module USPS peut fonctionner sans cURL mais il serait préférable de l\'activer.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_52f4393e1b52ba63e27310ca92ba098c'] = 'Configuration générale';
@@ -43,6 +44,18 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_6a26f548831e6a8c26bfbbd9f6ec61e0'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_d2126da975d5b9a5b846efaf57d3fd53'] = 'Configuration générale';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_b150f21f4d216c6c275de3d69dffac68'] = 'Votre Identifiant USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_ebbbab87d3a60b18f370b76f59dab31e'] = 'Cliquez ici pour obtenir votre USPS API Key';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_87b78c2dbb5786947e830f13097aece5'] = 'Zip code d\'origine';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_4412f0268c3b3690de46390018a96d1f'] = 'Services de livraison';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_25365926cec8ff5e8fbf1e518505c3e7'] = 'Commercial';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_b9c1e1209dbba5bb9b802c765d27e8a1'] = 'Regulier';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_78945de8de090e90045d299651a68a9b'] = 'Disponible';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_2d25c72c1b18e562f6654fff8e11711e'] = 'Non disponible';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_04ff9e6bb8238bad1936e3bdf84e8f23'] = 'Choisissez les services de livraison que vous voulez disponible pour vos clients.';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_a691732939e7e7ef90cfe0d6e738f3e9'] = 'Pour First-Class, Priority et Express Mail, vous avez la possibilité soit de mettre les taux \"COMMERCIAL RATE\" ou \"REGULAR RATE\".';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_e3cc25ccb469ec7047d9e7c4c13f4e46'] = '- Si vous payez pour l\'affranchissement en ligne ou avec une machine à affranchir, alors choisissez \"COMMERCIAL RATE\".';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_b3e6424dbec51d0cbf5c272eca58e275'] = '- Si vous payez l\'affranchissement au bureau de poste, alors choisissez \"Regular Rate\".';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_55219991df83d7a6e4a0ed60c1a11e40'] = '- Choisissiez soit les taux \"COMMERCIAL RATE\" soit les taux \"REGULAR RATE\". Ne choississez pas les deux';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_319c2c41aa9f6b4d5b70b56651abe6e9'] = 'Pour Parcel Post, Media Mail, et Library Mail ils ne s\'afficheront qu\'en \"REGULAR RATE\" seulement si les prix ne sont différents.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_db06a2900c66a3a2cb78fe3a470f1b85'] = 'Poids du colis';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_0274f749472f365e7d48a501e14793e6'] = 'Frais supplémentaire';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_83ad4fdaf06650e6d9d7ca18f82fb975'] = 'Configuration de localisation';
@@ -50,39 +63,22 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_f489118ea95c746d648d36bb50c226f0'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_659c95668841b7d6602ead454b28d4ba'] = 'L\'unité de poids de votre magasin (ex: kg ou lbs)';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_cc13d156306185fd42a860da3049567c'] = 'Unité de mesure';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f804c2bdebc117d9cde3cddad3b49845'] = 'L\'unité de mesure de votre magasin (ex: cm ou in)';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_2481447d04ae756836d32e3ade240ff4'] = 'Configuration de l\'adresse';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_e1e854ea29e53169a1301076441805db'] = 'Votre adresse (ligne 1)';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_846a54955f32846032981f8fe48c35ff'] = 'Votre adresse (ligne 2)';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_d30f507473129e70c4b962ceccf175cf'] = 'Code postal';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_57d056ed0984166336b7879c2af3657f'] = 'Votre ville';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_f8f5a972333ee726fbe5bb52409c0ed0'] = 'Choisissez un pays ...';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_4e9863cf5326e6714388045321665d07'] = 'Choisissez votre pays dans la liste.';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_46a2a41cc6e552044816a2d04634545d'] = 'Etat';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_cf1580798f7aba85d519afadf1ffd886'] = 'Choisissez un état ...';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_02546d525ab356bd43c91e6b07447496'] = 'Il n\'y a pas d\'état pour ce pays';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_0ddc2a5660f7d095fff34d6b93077c80'] = 'Configuration du service';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_aa9265dfaf7bc267a6e606335d942883'] = 'Taille des paquets';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_52c46f87566159d11390162e99ed9f68'] = 'Choisissez une taille de paquet';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_2afc962933ab94b832df8bfaa34ef05b'] = 'Choisissez la taille des paquets par défaut';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_da42caf26ef85de3d7e48e16ca60b891'] = 'Type de paquet';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_8d2ee0603dfce09b57d60db628cde269'] = 'Choisissez un type de paquet...';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_795de10b1bdcb843b3703c63ad577fc6'] = 'Choisissez le type de paquet par défaut';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_93c8645dbbc33cf8d126266a827a5501'] = 'Machinable';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_67cd0f5256c40c16a6cfd6effe3ab06b'] = 'Choisissez si cela peut être traité par une machine ou non par défaut';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_f297d2cb126758a96ae196f1865f74ec'] = 'Mode de calcul';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_fc805e1616e45e041e8bef86a9e3180d'] = 'Utiliser le mode de calcul \"Tous les éléments dans un seul paquet\" utilisera automatiquement la taille des emballages par défaut, le type d\'emballage et de livraison. Les configurations spécifiques pour les catégories ou de produit ne seront pas utilisés.';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_5cdd307ba6e260beb4801c0c10e22a3a'] = 'Service de livraison';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_78945de8de090e90045d299651a68a9b'] = 'Disponible';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_2d25c72c1b18e562f6654fff8e11711e'] = 'Non disponible';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_bafff0b69daa3ece3cf792eba6c3ef98'] = 'Choisissez les services de livraison qui seront activés par défaut pour vos clients.';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_b9947222399c6199839bb327a6f59d2b'] = 'Votre identifiant USPS n\'est pas spécifié';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_805353d2862ea0e658c9ddda871540fa'] = 'Votre code postal n\'est pas spécifié.';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_ef9bd955e165dfb0207877e9fe180aeb'] = 'Votre ville n\'est pas spécifiée';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_5ecc7697a320f93f3ee8fb4048dbd64c'] = 'Votre pays n\'est pas spécifié.';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_98045fb188a9c6076e839672a7f94485'] = 'La taille des paquets n\'est pas spécifié';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_e794e452ed4d2cfa13083693a2c8810e'] = 'Le type de paquet n\'est pas spécifié';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_b25a0f3caa6e0047ede272a6e91dac29'] = 'Le champs machinable n\'est pas spécifié';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_6a88783cc26a04f204c844a555af04f9'] = 'Mode de calcul';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_68c2e29510ba1fade36948082c1a460d'] = 'Utilisation du mode de calcul \"Tous les produits dans un seul colis\" utilisera automatiquement la taille de colis, le type de colis et les services de livraison par défaut. Les configurations spécifiques pour les catégories ou les produits ne seront pas pris en compte.';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_dd3635ee8f6dbca808391e9e2115114f'] = 'Votre USPS User ID n\'est pas spécifié';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_0304084f81483b19b6ef76799d0dcc98'] = 'Le Zip Code d\'origine n\'est pas spécifié';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_1416b880efa6a1706ec5a3a2e354b38b'] = 'Le Zip Code d\'origine n\'est pas valide';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_89849083c326e9e338193a29b398c8d6'] = 'Le poids du colis doit être \"égal à\" ou \"supérieur à\" 0';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_0a4c0dd36c1c6d407a696ba431661cb4'] = 'Les frais additionnels doivent être \"égal à\" ou \"supérieur à\" 0';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_b0e371d9aaf4dd29dcdf94c8f04a73f8'] = 'Vous devez choisir au moins un service de livraison';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_2c73878daaa3c04dfa31722352c48620'] = 'Vous devez utiliser soit \"COMMERCIAL RATE\" soit \"REGULAR RATE\" pour chaque type de service. Vous ne pouvez pas choisir les deux.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f858ebce2deafd485f17522ca80bca2b'] = 'Prestashop n\'a pas pu se connecter aux webservices d\'USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_9d1b485edd50e6fbd288b340b386b07d'] = 'Aucune description d\'erreur';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour';
@@ -100,7 +96,11 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_5406dcacf84176fecac51364e10dcdcf'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_5dd4dce839d0bddf557af415308a9224'] = 'Êtes vous sûr de vouloir effacer cette configuration USPS pour cette catégorie ?';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_3e0cb9fd22b124c0839302fef54762d7'] = 'Mettre à jour une règle';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_dd593f8a542ab628cbba98c709255e60'] = 'Ajouter une règle';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_8d2ee0603dfce09b57d60db628cde269'] = 'Choisissez un type de paquet...';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_52c46f87566159d11390162e99ed9f68'] = 'Choisissez une taille de paquet';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_56ee8a6c40098a28b2e4859d7f36bfc2'] = 'Choississez l\'option';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_5cdd307ba6e260beb4801c0c10e22a3a'] = 'Service de livraison';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_bafff0b69daa3ece3cf792eba6c3ef98'] = 'Choisissez les services de livraison qui seront activés par défaut pour vos clients.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_7fcafa7c47e984693fcb8a92c0fd1beb'] = 'Choississez une catégorie';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_d725c0166e978cc30853996c70440873'] = 'Vous devez choisir une catégorie.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_1ef6b71d233ca3c4d73ec49f18cce6ae'] = 'Cette catégorie a déjà une configuration USPS.';
@@ -116,7 +116,8 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_e41495cddec502278844d90501b8f688'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_04f65a638b5713539804e1f851f11f6f'] = 'Cette section vous aidera à comprendre comment configurer correctement ce module.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_ec0e6948e8f34818d80f27c309f46661'] = 'Ci-dessous les descriptions de chaque champs :';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_2d6a1f95c12c41a1937520809bb3e0b0'] = 'Vous devez vous inscrire sur le site d\'USPS à cette adresse';
-$_MODULE['<{uspscarrier}prestashop>uspscarrier_6eef8fc653ad4369da95861ad29ac3ef'] = 'Ce champs doit être le code postal du point de départ de vos colis.';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_997eaba18a174723bb35c745d3bcba04'] = 'Ce champ identifie le code postal de votre point de départ des colis.';
+$_MODULE['<{uspscarrier}prestashop>uspscarrier_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_b79cacaef47c6e646f6afaf139b2863a'] = 'Ce champs doit être le pays du point de départ de vos colis.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_1d3fce5a25604726c1b3c726f9938858'] = 'Ce champs correspond au type de colis par défaut (lorsqu\'il n\'y a pas de configuration spécifique pour le produit ou pour la catégorie du produit).';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_3223a2c4e378eb07a8e0d21f914389a2'] = 'Ces cases à cocher correspondent aux services de livraisons que vous souhaitez proposer à vos clients (lorsqu\'il n\'y a pas de configuration spécifique pour le produit ou pour la catégorie du produit).';
diff --git a/themes/prestashop/css/global.css b/themes/prestashop/css/global.css
index 6885424e1..07e337606 100644
--- a/themes/prestashop/css/global.css
+++ b/themes/prestashop/css/global.css
@@ -1507,4 +1507,6 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px }
border: 2px solid #D0D3D8;
}
-.page404_input { float: left; }
\ No newline at end of file
+.page404_input { float: left; }
+
+#order #discount_name { width: 130px; }
\ No newline at end of file
diff --git a/themes/prestashop/header.tpl b/themes/prestashop/header.tpl
index 53f0882fc..978088200 100644
--- a/themes/prestashop/header.tpl
+++ b/themes/prestashop/header.tpl
@@ -71,7 +71,7 @@