From 45bd35a19a0997ed0c82cbeafbdbacd21ed68d89 Mon Sep 17 00:00:00 2001 From: fSerny Date: Wed, 23 Nov 2011 00:29:59 +0000 Subject: [PATCH] [-] MO : TNT Carrier (1.1) --- modules/tntcarrier/config.xml | 2 +- modules/tntcarrier/css/tntB2CRelaisColis.css | 2 +- modules/tntcarrier/follow.php | 5 +- modules/tntcarrier/fr.php | 156 ++++++++++++------ modules/tntcarrier/js/relaisColis.js | 11 +- modules/tntcarrier/js/shipping.js | 14 +- .../tntcarrier/relaisColis/js/relaisColis.js | 2 +- .../tntcarrier/relaisColis/relaisColis.php | 22 ++- modules/tntcarrier/relaisColis/tntRelais.php | 2 +- modules/tntcarrier/tntGetDepot.php | 153 +++++++++-------- modules/tntcarrier/tntcarrier.php | 114 +++++++------ modules/tntcarrier/tpl/accountForm.tpl | 15 +- modules/tntcarrier/tpl/country.tpl | 4 +- modules/tntcarrier/tpl/countryForm.tpl | 2 +- modules/tntcarrier/tpl/follow.tpl | 33 ++-- modules/tntcarrier/tpl/formerror.tpl | 12 +- modules/tntcarrier/tpl/main.tpl | 8 +- modules/tntcarrier/tpl/relaisColis.tpl | 31 +++- modules/tntcarrier/tpl/service.tpl | 36 ++-- modules/tntcarrier/tpl/serviceForm.tpl | 4 +- modules/tntcarrier/tpl/shippingForm.tpl | 123 ++++++++------ modules/tntcarrier/tpl/waitingFollow.tpl | 1 - 22 files changed, 428 insertions(+), 324 deletions(-) diff --git a/modules/tntcarrier/config.xml b/modules/tntcarrier/config.xml index f0d26a86b..cf3ef0d9c 100644 --- a/modules/tntcarrier/config.xml +++ b/modules/tntcarrier/config.xml @@ -2,7 +2,7 @@ tntcarrier - + diff --git a/modules/tntcarrier/css/tntB2CRelaisColis.css b/modules/tntcarrier/css/tntB2CRelaisColis.css index 488149a6f..68ac96e45 100644 --- a/modules/tntcarrier/css/tntB2CRelaisColis.css +++ b/modules/tntcarrier/css/tntB2CRelaisColis.css @@ -24,7 +24,7 @@ } .tntRCSubHeader { - background-color: #ffffff; + //background-color: #ffffff; border-width: 0px; color: #a0a0a0; display: bloc; diff --git a/modules/tntcarrier/follow.php b/modules/tntcarrier/follow.php index a8018ca38..6832ecdeb 100644 --- a/modules/tntcarrier/follow.php +++ b/modules/tntcarrier/follow.php @@ -1,9 +1,8 @@ assign('erreur', $erreur); +//$smarty->assign('erreur', $erreur); $smarty->assign('config',$config); $smarty->assign( 'follow', $follow ); $smarty->display('tpl/follow.tpl' ); diff --git a/modules/tntcarrier/fr.php b/modules/tntcarrier/fr.php index 5704dbbb5..2b939db7f 100644 --- a/modules/tntcarrier/fr.php +++ b/modules/tntcarrier/fr.php @@ -4,69 +4,40 @@ global $_MODULE; $_MODULE = array(); $_MODULE['<{tntcarrier}prestashop>tntcarrier_58ec6a48b4720ef0aa2adfded1ccf8a3'] = 'TNT Express'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_9b7637001f5d2bcb42efb4ab6b3e93da'] = 'Offre aux clients, différentes methodes de livraison'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_416900392875e9effb318da8648fbdcb'] = 'doit ou doivent etre configuré(s) pour utiliser le module correctement'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_632cae5cf3af08786414932a8e6f96a0'] = 'Pseudonyme TNT'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_416900392875e9effb318da8648fbdcb'] = 'doivent etre configurés pour utiliser le module correctement'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_e2236d4f47edb104d62eaa4168b298f0'] = 'doit être configuré pour utiliser le module correctement.'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_632cae5cf3af08786414932a8e6f96a0'] = 'Identifiant TNT'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_3b4f51300711a1eb61770d1696702402'] = 'Mot de passe TNT'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_0e3b102c1a4938889716cea423a95001'] = 'Numéro de compte TNT'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_e81d9f25acf7fa457ab32527a882ed50'] = 'Transporteur TNT'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_d968787921c136e1cf9f766562aec8bc'] = 'Les paramètres suivants vous ont été fournis par TNT'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_af7c2efe81330e4c9089f2c90781282e'] = 'Si vous n\'êtes pas encore inscrit, cliquez sur'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_6c92285fa6d3e827b198d120ea3ac674'] = 'ici'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_8af703b2bf59cc9742883ae7f4cb0e5b'] = 'Paramètres du compte'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_927e079056c2709236d4167bbb96e799'] = 'Réglages d\'expédition'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_82fe86ee1a21af1c1db5c8c4c5e5a188'] = 'Paramètres du service'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_160f61d02d22b76b47b4305094bf36a6'] = 'Compte TNT'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiant'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_dc647eb65e6711e155375218212b3964'] = 'Mot de passe'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_05e642d027a22d12780ccf91bf9d7d34'] = 'Numéro de compte'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_8005dfbbaf4c9333592f26e82ddfd0af'] = 'Remplissez le formulaire avec les données'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Expédition'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_4d8ff211a4a8a140e293736f92ac39d5'] = 'Aimeriez-vous que TNT ramasse votre colis ?'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_581bf6fa6cd6d4bf4b0bbe2cfe6e404c'] = 'Non (via un dépôt)'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_f5234754269687df652c9f6f2f80cc10'] = 'Choisissez votre emplacement dépositaire'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_e7a7e191423e6a9ce3b59fd51ecbde87'] = 'Le code pex'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_e7b47c58815acf1d3afa59a84b5db7fb'] = 'Nom de l\'entreprise'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom de famille'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_e9f79aa2b1f455a52497a126d9442582'] = 'Adresse ligne 1'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_3d4d4cac03e194ab20154382cd544e0f'] = 'Adresse ligne 2'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_d30f507473129e70c4b962ceccf175cf'] = 'Zip / Code Postal'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_d0585aac6bb77bb49423b2effca0e067'] = 'Votre ville'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_f775ad1fbb08939178d4df9c457601f2'] = 'Votre adresse email'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_67c19a5276428fb9e49c557b1a3526d5'] = 'Votre numéro de téléphone'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_6222760252f52bb4dc70835d238d5484'] = 'Votre heure de clôture'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_cf67059a7bd51c3543def1ee4bdc4fe1'] = 'Livraison le samedi'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Aucun'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_dc86b23a40568ae3ece2d3008ca61442'] = 'Format de l\'étiquette pour l\'impression (Cette étiquette doit être collée sur l\'emballage)'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_2976cd63d00184e3f0a45c1337cd31f0'] = 'Impression A4'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_2f95a5450ee306f7faca792e379ccb34'] = 'sans imprimer le logo de TNT'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_44fca4829aecbdf69a2200ea0a10a8aa'] = 'avec une impression inverse'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_a67ee8b3121d0ceb601e9f0600db9692'] = 'sans imprimer le logo TNT et avec une impression inverse'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_1c85ce46031e67c95be9aa05b859f955'] = 'Nouveau service'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_49ee3087348e8d44e1feda1917443987'] = 'Nom'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_ca0dbad92a874b2f69b549293387925e'] = 'Code'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_7ec0def44906b0cd2848459349eea638'] = 'Frais additionnels (€)'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_cb456215c3333db0551bd0788bc258c7'] = 'Activé'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_de95b43bceeb4b998aed4aed5cef1ae7'] = 'modifier'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_099af53f601532dbd31e0ea99ffdeb64'] = 'supprimer'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_7b9cf007806ed854cd12ab800c8a982b'] = 'Lieu'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_b06cdf3c0c75a1a58b82761f87f458e4'] = 'Etat du module transporteur TNT'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_4c7b2960da33c41e9bbea499696702ca'] = 'Le module transporteur TNT est configuré et en ligne'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_efce38300739e2fd6cef1acd9ce68a1c'] = 'Le module transporteur TNT n\'est pas encore configuré, s\'il vous plait :'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_a8341741d73ef0a3ca5e8a7facc9a738'] = 'Assurez vous d\'avoir un compte TNT'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_3dab1e2673a4acc557135ccf795d4e31'] = 'Assurez vous d\'avoir une adresse correcte d\'expedition'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_057c674e4d23b04c0cbe1bfe81a0bec1'] = 'Assurez vous que certains services sont actifs'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_9d5b24e0e3516fcef94916366fadae67'] = 'Nouvelle option Poids'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_02f6a536789c7b8399ddbd1652d85d9c'] = 'Poids Min'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_03b4258831663af9e7f48bc6bc574e6c'] = 'Poids Max'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_1fc73713174ad5eb03c739919ac430e0'] = 'Les paramètres suivants sont correctement configurés et activés sur votre boutique :'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_a26e3a6c254d271fc27418f8b70359b8'] = 'Compte TNT. (Onglet Paramètres de compte)'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_6ffb536c94a6c31c53bf5dff30e9279e'] = 'Adresse d\'expédition. (Onglet adresse d\'expédition)'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_b691e01572a1a26f81b45a59485eeef0'] = 'Choix du mode de livraison spécifique TNT que vous voulez offrir à vos clients. (Onglet Mode de livraison)'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_a37a7157334806e3c62eea1592bd71e5'] = 'Les paramètres suivants doivent être configurés pour être en mesure d\'utiliser correctement le module TNT:'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_3bdbda3bf0eaeb6d537e8e71831ccd51'] = 'Ajouter des frais supplémentaires en fonction du poids du colis'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_02f6a536789c7b8399ddbd1652d85d9c'] = 'Poids Min (Kg)'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_03b4258831663af9e7f48bc6bc574e6c'] = 'Poids Max (Kg)'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_7ec0def44906b0cd2848459349eea638'] = 'Frais additionnels (€)'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_0619bef93192e574f288fe2e55c3a7f7'] = 'Poids min'; -$_MODULE['<{tntcarrier}prestashop>tntcarrier_d8c74112ba3622be2e79d4d4dc24eaf4'] = 'Poids max'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_d57c218ba8993f897e7d0d607cb0919b'] = 'Poids max (peut être vide)'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_508ccf43328cac4c93d1de242d2ddffb'] = 'Frais additionnels'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_43781db5c40ecc39fd718685594f0956'] = 'Enregistrer'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_31233b21c141d4a9d6aa01a02d1122ae'] = 'Tous les champs sont obligatoires'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_7671f3696ad03d80261fb2bbcf333b0e'] = 'Le code de pex est manquant'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_f7ccaf14e6a159fbf74c3574f24f6c98'] = 'Le nom de votre société est manquant'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_ed0e7964e931baea6fe213b85d47dcae'] = 'Votre nom de famille est manquant'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_bc76583af7e30c752071c4c22becb202'] = 'Votre prénom est manquant'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_a6940761269d856d96b9ab14cd2a6622'] = 'Votre adresse est manquante'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_9213e685b255732fa7505b6204aeaa79'] = 'Votre adresse ligne 2 doit être inférieur à 32 caractères'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_eb935b898b0fb568b9508bbc1a0fcc37'] = 'Votre code postal est manquant'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_d9f4b12b8eee0330f2085cd50f52211b'] = 'Votre adresse email est manquante'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_afaa05f3479edb1d285563be231f8552'] = 'Votre numéro de téléphone est manquant'; +$_MODULE['<{tntcarrier}prestashop>tntcarrier_450af965cc6328e0f4713a4bf9f8f705'] = 'Votre heure de fermeture est manquante'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_69d865b41dc0e6611be76776c4a9456d'] = 'Vous devez donner un nom au service'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_e71361626c48f42620b92cc81fd41ba2'] = 'Vous devez donner un code au service'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_d2f2575c30fa33e53905ae05bc02f281'] = 'Vous devez donner une description au service'; @@ -74,8 +45,41 @@ $_MODULE['<{tntcarrier}prestashop>tntcarrier_4a015051e9e879952cf4215d344ec101'] $_MODULE['<{tntcarrier}prestashop>tntcarrier_74d87a5cbf64f95c490b2cf85710a4eb'] = 'Le(s) numéro(s) d\'expédition(s)'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_2fd7870126dd86cedc2be112e7e59ebc'] = 'L\'étiquette'; $_MODULE['<{tntcarrier}prestashop>tntcarrier_d5aad80114d8aa47f31a6f5050ef6835'] = 'Expédition'; +$_MODULE['<{tntcarrier}prestashop>accountform_d968787921c136e1cf9f766562aec8bc'] = 'Les paramètres suivants vous ont été fournis par TNT'; +$_MODULE['<{tntcarrier}prestashop>accountform_af7c2efe81330e4c9089f2c90781282e'] = 'Si vous n\'êtes pas encore inscrit, cliquez '; +$_MODULE['<{tntcarrier}prestashop>accountform_6c92285fa6d3e827b198d120ea3ac674'] = 'ici'; +$_MODULE['<{tntcarrier}prestashop>accountform_160f61d02d22b76b47b4305094bf36a6'] = 'Compte TNT'; +$_MODULE['<{tntcarrier}prestashop>accountform_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiant'; +$_MODULE['<{tntcarrier}prestashop>accountform_dc647eb65e6711e155375218212b3964'] = 'Mot de passe'; +$_MODULE['<{tntcarrier}prestashop>accountform_05e642d027a22d12780ccf91bf9d7d34'] = 'Numéro de compte'; +$_MODULE['<{tntcarrier}prestashop>accountform_43781db5c40ecc39fd718685594f0956'] = 'Enregistrer'; +$_MODULE['<{tntcarrier}prestashop>country_7b9cf007806ed854cd12ab800c8a982b'] = 'Lieu'; +$_MODULE['<{tntcarrier}prestashop>country_4dd77960e89b80d1b11e7c095e47d8e0'] = 'Frais additionnels (€)'; +$_MODULE['<{tntcarrier}prestashop>country_de95b43bceeb4b998aed4aed5cef1ae7'] = 'modifier'; +$_MODULE['<{tntcarrier}prestashop>countryform_43781db5c40ecc39fd718685594f0956'] = 'Enregistrer'; +$_MODULE['<{tntcarrier}prestashop>follow_1a315e32fa4a411ea6a2ea8bd8ccc622'] = 'Information sur le Colis'; +$_MODULE['<{tntcarrier}prestashop>follow_910d956cb2615e5739ac06c7f08fba26'] = 'Numéro d\'expedition'; +$_MODULE['<{tntcarrier}prestashop>follow_b858b5e76fea1f971f69c7395e6e2235'] = 'État d\'expédition'; +$_MODULE['<{tntcarrier}prestashop>follow_63d5049791d9d79d86e9a108b0a999ca'] = 'Référence'; +$_MODULE['<{tntcarrier}prestashop>follow_c2ba7e785c49050f48da9aacc45c2b85'] = 'Service'; +$_MODULE['<{tntcarrier}prestashop>follow_8c489d0946f66d17d73f26366a4bf620'] = 'Poids'; +$_MODULE['<{tntcarrier}prestashop>follow_a4ecfc70574394990cf17bd83df499f7'] = 'Evénement'; +$_MODULE['<{tntcarrier}prestashop>follow_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{tntcarrier}prestashop>follow_6a7e73161603d87b26a8eac49dab0a9c'] = 'Heures'; +$_MODULE['<{tntcarrier}prestashop>follow_84246e5b819bd9afe465dc44eec0d528'] = 'Nom du centre'; +$_MODULE['<{tntcarrier}prestashop>follow_16328b440b4698eae30df60adc198623'] = 'Dépôt de départ'; +$_MODULE['<{tntcarrier}prestashop>follow_ff0aa49d3eeadb46b41cf22eeaf41fb5'] = 'Présentation du chauffeur'; +$_MODULE['<{tntcarrier}prestashop>follow_e2560f1841797910acf77fee40e3715d'] = 'la signature'; $_MODULE['<{tntcarrier}prestashop>formerror_c3f15ecc6da0827a8da712cb43a0b596'] = 'information d\'expédition'; +$_MODULE['<{tntcarrier}prestashop>formerror_53335695e4675e831a73dec05e417886'] = 'Le poids de l\'emballage doit être compris entre 0,1 et 30,0 kg ou appelez votre contact commercial TNT.'; +$_MODULE['<{tntcarrier}prestashop>formerror_8c489d0946f66d17d73f26366a4bf620'] = 'Poids'; +$_MODULE['<{tntcarrier}prestashop>formerror_7423cbf15a98a1e3eb9cd4d3f8333776'] = 'Vous devez changer la date d\'expédition'; +$_MODULE['<{tntcarrier}prestashop>formerror_44749712dbec183e983dcd78a7736c41'] = 'Date'; $_MODULE['<{tntcarrier}prestashop>formerror_7f090bbab1cc7f9c08bf4e54d932d3c0'] = 'Modifier'; +$_MODULE['<{tntcarrier}prestashop>main_8af703b2bf59cc9742883ae7f4cb0e5b'] = 'Paramètres du compte'; +$_MODULE['<{tntcarrier}prestashop>main_927e079056c2709236d4167bbb96e799'] = 'Adresse d\'expédition'; +$_MODULE['<{tntcarrier}prestashop>main_82fe86ee1a21af1c1db5c8c4c5e5a188'] = 'Mode de livraison'; +$_MODULE['<{tntcarrier}prestashop>service_00c54a75a559bba7732d9b2c810a852b'] = 'Les services dont le code n\'a qu\'une seule lettre sont ceux proposés aux entreprises. Ainsi, ils seront uniquement proposés aux clients qui ont rempli le champ Société'; $_MODULE['<{tntcarrier}prestashop>service_ca0dbad92a874b2f69b549293387925e'] = 'Code'; $_MODULE['<{tntcarrier}prestashop>service_41350c4c9683f48b15d04adc3f76925b'] = '08h00 express'; $_MODULE['<{tntcarrier}prestashop>service_4b0977efd9aa11417b7139f35ed777a0'] = '09h00 express'; @@ -87,4 +91,46 @@ $_MODULE['<{tntcarrier}prestashop>service_c24eb7cd3484f223c03e64f2728a61ae'] = ' $_MODULE['<{tntcarrier}prestashop>service_b5410e878f792a03b81e7803a626caaa'] = 'Colis relais'; $_MODULE['<{tntcarrier}prestashop>service_6cefaa978ccec960693d10cefeb2c2bf'] = 'Livraison à domicile'; $_MODULE['<{tntcarrier}prestashop>service_9582039a366d19cb0b957bd4220dd6f7'] = 'Service entreprise '; +$_MODULE['<{tntcarrier}prestashop>service_7e0de5b1122d90d8bfb6ee3ffc5f96d1'] = 'Ajouter un service TNT via son code spécifique'; +$_MODULE['<{tntcarrier}prestashop>service_490aa6e856ccf208a054389e47ce0d06'] = 'Id'; +$_MODULE['<{tntcarrier}prestashop>service_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{tntcarrier}prestashop>service_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description'; +$_MODULE['<{tntcarrier}prestashop>service_c13367945d5d4c91047b3b50234aa7ab'] = 'Code'; +$_MODULE['<{tntcarrier}prestashop>service_ce0022ab4f29f07dcc5f63ac1ed92bfa'] = 'Frais Supplémentaire (€)'; +$_MODULE['<{tntcarrier}prestashop>service_cb456215c3333db0551bd0788bc258c7'] = 'Actif'; +$_MODULE['<{tntcarrier}prestashop>service_de95b43bceeb4b998aed4aed5cef1ae7'] = 'modifier'; +$_MODULE['<{tntcarrier}prestashop>service_099af53f601532dbd31e0ea99ffdeb64'] = 'supprimer'; +$_MODULE['<{tntcarrier}prestashop>serviceform_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{tntcarrier}prestashop>serviceform_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description'; +$_MODULE['<{tntcarrier}prestashop>serviceform_c13367945d5d4c91047b3b50234aa7ab'] = 'Code'; +$_MODULE['<{tntcarrier}prestashop>serviceform_51866de17fcc83e505a2a43fa054082d'] = 'Frais Supplémentaire'; +$_MODULE['<{tntcarrier}prestashop>serviceform_cb456215c3333db0551bd0788bc258c7'] = 'Actif'; +$_MODULE['<{tntcarrier}prestashop>serviceform_43781db5c40ecc39fd718685594f0956'] = 'Enregistrer'; +$_MODULE['<{tntcarrier}prestashop>shippingform_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Expédition'; +$_MODULE['<{tntcarrier}prestashop>shippingform_15dcb6be9acfca3fd8044a98b3353586'] = 'Souhaitez-vous que TNT récupère vos colis directement à votre entrepôt ?'; +$_MODULE['<{tntcarrier}prestashop>shippingform_6f0e9e4cb6a2da23bb2d51a24abbf1c4'] = 'Non (il vous faudra alors déposer vos colis dans un dépôt TNT. Merci de choisir dans le formulaire l\'agence dépôt par laquelle vous souhaitez passer)'; +$_MODULE['<{tntcarrier}prestashop>shippingform_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{tntcarrier}prestashop>shippingform_f5234754269687df652c9f6f2f80cc10'] = 'Choisissez votre emplacement dépositaire'; +$_MODULE['<{tntcarrier}prestashop>shippingform_c0e57adbf247c582693be5803459b20e'] = 'Vos informations'; +$_MODULE['<{tntcarrier}prestashop>shippingform_46e1a902c9f386120e65e976ad1a3c77'] = 'Information de l\'agence dépôt'; +$_MODULE['<{tntcarrier}prestashop>shippingform_86f7dcec9578f27ac23b12cd2497d580'] = 'Pex code'; +$_MODULE['<{tntcarrier}prestashop>shippingform_e7b47c58815acf1d3afa59a84b5db7fb'] = 'Nom de l\'entreprise'; +$_MODULE['<{tntcarrier}prestashop>shippingform_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom de famille'; +$_MODULE['<{tntcarrier}prestashop>shippingform_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; +$_MODULE['<{tntcarrier}prestashop>shippingform_e9f79aa2b1f455a52497a126d9442582'] = 'Adresse ligne 1'; +$_MODULE['<{tntcarrier}prestashop>shippingform_3d4d4cac03e194ab20154382cd544e0f'] = 'Adresse ligne 2'; +$_MODULE['<{tntcarrier}prestashop>shippingform_25f75488c91cb6c3bab92672e479619f'] = 'Code postal'; +$_MODULE['<{tntcarrier}prestashop>shippingform_57d056ed0984166336b7879c2af3657f'] = 'Ville'; +$_MODULE['<{tntcarrier}prestashop>shippingform_f775ad1fbb08939178d4df9c457601f2'] = 'Votre adresse email'; +$_MODULE['<{tntcarrier}prestashop>shippingform_67c19a5276428fb9e49c557b1a3526d5'] = 'Votre numéro de téléphone'; +$_MODULE['<{tntcarrier}prestashop>shippingform_6222760252f52bb4dc70835d238d5484'] = 'Votre heure de clôture'; +$_MODULE['<{tntcarrier}prestashop>shippingform_cf67059a7bd51c3543def1ee4bdc4fe1'] = 'Livraison le samedi'; +$_MODULE['<{tntcarrier}prestashop>shippingform_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{tntcarrier}prestashop>shippingform_dc86b23a40568ae3ece2d3008ca61442'] = 'Format de l\'étiquette pour l\'impression (Cette étiquette doit être collée sur l\'emballage)'; +$_MODULE['<{tntcarrier}prestashop>shippingform_2976cd63d00184e3f0a45c1337cd31f0'] = 'impression A4'; +$_MODULE['<{tntcarrier}prestashop>shippingform_2f95a5450ee306f7faca792e379ccb34'] = 'sans imprimer le logo de TNT'; +$_MODULE['<{tntcarrier}prestashop>shippingform_44fca4829aecbdf69a2200ea0a10a8aa'] = 'avec une impression inverse'; +$_MODULE['<{tntcarrier}prestashop>shippingform_a67ee8b3121d0ceb601e9f0600db9692'] = 'sans imprimer le logo TNT et avec une impression inverse'; +$_MODULE['<{tntcarrier}prestashop>shippingform_43781db5c40ecc39fd718685594f0956'] = 'Enregistrer'; +$_MODULE['<{tntcarrier}prestashop>shippingform_70397c4b252a5168c5ec003931cea215'] = 'Champs obligatoire'; $_MODULE['<{tntcarrier}prestashop>shippingnumber_c3f15ecc6da0827a8da712cb43a0b596'] = 'L\'information d\'expédition'; diff --git a/modules/tntcarrier/js/relaisColis.js b/modules/tntcarrier/js/relaisColis.js index 138b7b219..eb29331b9 100644 --- a/modules/tntcarrier/js/relaisColis.js +++ b/modules/tntcarrier/js/relaisColis.js @@ -148,7 +148,6 @@ function tntRCafficheRelais(jData) { tntRCjTable.append(tntRCligneBlanche6Col()); jMessage.append(tntRCjTable); - jMessage.append(tntRCchangerCodePostal()); }; @@ -159,10 +158,10 @@ function tntB2CRelaisColisGetBodyMain() { ""+ ""+ ""+ - ""+ + ""+ "" + ""+ - "
" + tntRCMsgBodyInput + "
" + + "" + ""+ ""+ ""); @@ -181,7 +180,7 @@ function tntB2CRelaisColis() { var tntRelaisColisB2C = $("#tntB2CRelaisColis"); tntRelaisColisB2C.html( "
"+ - "
"+ tntRCMsgHeaderTitle + "
"+ + ""+ "
" + tntRCMsgSubHeaderTitle + "
"+ "
"+ "
"+ @@ -308,7 +307,7 @@ function tntRCafficheCommunes(jData) { tntRCligneBlanche6Col()); blocCodePostal.html(tntRCjTable); - + alert('lol'); // Bloc de saisie d'un nouveau code postal blocCodePostal.append(tntRCchangerCodePostal()); } @@ -556,7 +555,7 @@ function tntRCchangerCodePostal(){ ""+ ""+ ""+ - ""+ + ""+ "" + ""+ "
Vous pouvez choisir un autre code postal de livraison :
"+ diff --git a/modules/tntcarrier/js/shipping.js b/modules/tntcarrier/js/shipping.js index f3b67196c..8b6aa2979 100644 --- a/modules/tntcarrier/js/shipping.js +++ b/modules/tntcarrier/js/shipping.js @@ -4,16 +4,22 @@ function tntRCgetDepot() tntRCcodePostal = $("#tntRCInputCP").val(); if (tntRCcodePostal=="") return; if (isNaN(parseInt(tntRCcodePostal))) { - tntRCgetRelaisColis(tntRCMsgErrCodePostal); + tntRCgetRelaisColis("Veuillez saisir un code départemental correct"); return; } tntRCsetChargementEnCours(); - $("#tntRCLoading").load( + $.get( "../modules/tntcarrier/tntGetDepot.php?code="+tntRCcodePostal, function(response, status, xhr) { if (status == "error") $("#tntRCLoading").html(xhr.status + " " + xhr.statusText); + if (response == "The field 'department' is not a valid french department code.\n") + $("#tntRCLoading").html("Vous n'avez pas saisi un code correct départemental français\n"); + else if (response.indexOf("The security token could not be authenticated or authorized") >= 0) + $("#tntRCLoading").html("Vos identifiants sont incorrects\n"); + else + $("#tntRCLoading").html(response); } ); } @@ -34,10 +40,12 @@ $(document).ready(function() { transport1.click(function() { $("#divPex").css("display", "none"); $("#divClosing").css("display", ""); + $("#tnt_exp_names").css("display", ""); }); transport2.click(function() { $("#divPex").css("display", ""); $("#divClosing").css("display", "none"); + $("#tnt_exp_names").css("display", "none"); }); }); @@ -51,7 +59,7 @@ function callbackSelectionRelais() var city = document.getElementById("tntRCSelectedCommune").value; if (!code || code == "") - alert("Aucun depot selectionne"); + alert("Aucune agence d\351pot selectionn\351e"); else { document.getElementById("tnt_carrier_shipping_pex").value = code; diff --git a/modules/tntcarrier/relaisColis/js/relaisColis.js b/modules/tntcarrier/relaisColis/js/relaisColis.js index f347bfd7c..36124222e 100644 --- a/modules/tntcarrier/relaisColis/js/relaisColis.js +++ b/modules/tntcarrier/relaisColis/js/relaisColis.js @@ -180,7 +180,7 @@ function tntB2CRelaisColis() { var tntRelaisColisB2C = $("#tntB2CRelaisColis"); tntRelaisColisB2C.html( "
"+ - "
"+ tntRCMsgHeaderTitle + "
"+ + "
" + tntRCMsgSubHeaderTitle + "
"+ ""+ ""+ diff --git a/modules/tntcarrier/relaisColis/relaisColis.php b/modules/tntcarrier/relaisColis/relaisColis.php index 8f13504ec..0f5517ff7 100644 --- a/modules/tntcarrier/relaisColis/relaisColis.php +++ b/modules/tntcarrier/relaisColis/relaisColis.php @@ -10,15 +10,23 @@ $relais = Db::getInstance()->getValue('SELECT c.id_carrier { ?> diff --git a/modules/tntcarrier/relaisColis/tntRelais.php b/modules/tntcarrier/relaisColis/tntRelais.php index 19d66dcd1..6bbaba0fc 100644 --- a/modules/tntcarrier/relaisColis/tntRelais.php +++ b/modules/tntcarrier/relaisColis/tntRelais.php @@ -35,7 +35,7 @@
-
Mode de livraison
+
Choisissez le Relais Colis ® diff --git a/modules/tntcarrier/tntGetDepot.php b/modules/tntcarrier/tntGetDepot.php index 3ec254ba3..48aa976cb 100644 --- a/modules/tntcarrier/tntGetDepot.php +++ b/modules/tntcarrier/tntGetDepot.php @@ -42,80 +42,87 @@ else } if (isset($follow)) { - //var_dump($follow->DepotInfo); - $v = $follow->DepotInfo; - if (!is_array($follow->DepotInfo)) - echo " - - - - - - "; - else - echo " - - - - - - "; - echo " - - - - - - - - "; - if (is_array($follow->DepotInfo)) - echo ""; - else - echo ""; - echo " - - "; - if (is_array($follow->DepotInfo)) - foreach ($follow->DepotInfo as $key => $v) - { - echo" - - - - - - - - - - - - - - - "; - } + //var_dump($follow); + if (isset($follow->DepotInfo)) + { + $v = $follow->DepotInfo; + if (!is_array($follow->DepotInfo)) + echo " + + + + + + "; else - echo" - - - - - - - - - - - - - - - "; - echo " -
 Agences TNTChoix
$v->name $v->address1 $v->address2
$v->zipCode $v->city
$v->message
$v->name $v->address1 $v->address2
$v->zipCode $v->city
$v->message
- "; + echo " + + + + + + "; + echo " + + + + + + + + "; + if (is_array($follow->DepotInfo)) + echo ""; + else + echo ""; + echo " + + "; + if (is_array($follow->DepotInfo)) + foreach ($follow->DepotInfo as $key => $v) + { + echo" + + + + + + + + + + + + + + + "; + } + else + echo" + + + + + + + + + + + + + + + "; + echo " +
 Agences TNTChoix
$v->name $v->address1 $v->address2
$v->zipCode $v->city
$v->message
$v->name $v->address1 $v->address2
$v->zipCode $v->city
$v->message
+
+ +
"; + } + else + echo "Aucun dépôt trouvé"; } } ?> \ No newline at end of file diff --git a/modules/tntcarrier/tntcarrier.php b/modules/tntcarrier/tntcarrier.php index e6049085d..f140f1184 100644 --- a/modules/tntcarrier/tntcarrier.php +++ b/modules/tntcarrier/tntcarrier.php @@ -26,7 +26,7 @@ class TntCarrier extends CarrierModule { $this->name = 'tntcarrier'; $this->tab = 'shipping_logistics'; - $this->version = '1.0'; + $this->version = '1.1'; $this->author = 'PrestaShop'; $this->limited_countries = array('fr'); @@ -51,8 +51,10 @@ class TntCarrier extends CarrierModule foreach($carriers as $carrier) $id_carrier_list[] .= $carrier['id_carrier']; - if (count($warning)) + if (count($warning) > 1) $this->warning .= implode(' , ',$warning).$this->l('must be configured to use this module correctly.').' '; + if (count($warning) == 1) + $this->warning .= implode(' , ',$warning).$this->l('has to be configured to use this module correctly.').' '; } } @@ -221,7 +223,7 @@ class TntCarrier extends CarrierModule public function getContent() { - $this->_html .= '

' . $this->l('TNT Carrier').'

'; + $this->_html .= '

' . $this->l('TNT Carrier').'

'; if (!empty($_POST) AND Tools::isSubmit('submitSave')) { $this->_postValidation(); @@ -229,7 +231,7 @@ class TntCarrier extends CarrierModule $this->_postProcess(); else foreach ($this->_postErrors AS $err) - $this->_html .= '
nok '.$err.'
'; + $this->_html .= '
nok '.$err.'
'; } $this->_displayForm(); return $this->_html; @@ -248,20 +250,6 @@ class TntCarrier extends CarrierModule $smarty->assign('glob', $globalVar); - $lang = array( - 'followParameters' => $this->l('The following parameters were provided to you by TNT'), 'registered' => $this->l('If you are not yet registered, click '), 'here' => $this->l('here'), - 'accountSetting' => $this->l('Account settings'), 'shippingSetting' => $this->l('Shipping Settings'), 'serviceSetting' => $this->l('Service Settings'), - 'accountTNT' => $this->l('Account TNT'), 'login' => $this->l('Login'), 'password' => $this->l('Password'), 'numberAccount' => $this->l('Number account'), - 'fillDataInTheForm' => $this->l('Fill Data in the form'), 'shipping' => $this->l('Shipping'), 'collect' => $this->l('Would you like TNT to pick up your package ?'), 'noDeposit' => $this->l('No (Deposit)'), - 'yes' => $this->l('Yes'), 'chooseYourDepositoryLocation' => $this->l('Choose your depository location'), 'pexCode' => $this->l('Pex Code'), 'companyName' => $this->l('Company Name'), - 'lastName' => $this->l('Last name'), 'firstName' => $this->l('First name'), 'address1' => $this->l('Address line 1'), 'address2' => $this->l('Address line 2'), 'zip' => $this->l('Zip / Postal Code'), 'city' => $this->l('Your City'), - 'email' => $this->l('Your Email Address'), 'phone' => $this->l('Your Phone Number'), 'closingTime' => $this->l('Your Closing Time'), 'saturdayDelivery' => $this->l('Saturday Delivery'), 'no' => $this->l('No'), - 'labelFormatPrinting' => $this->l('Label Format for printing (This Label will have to be sticked on the package)'), 'a4printing' => $this->l('A4 printing'), 'withoutPrintingLogoTNT' => $this->l('without printing the logo TNT'), 'withReversePrint' => $this->l('with a reverse print'), 'withoutPrintingLogoTNTWithReversePrint' => $this->l('without printing the logo TNT and with a reverse print'), - 'newService' => $this->l('New Service'), 'id' => $this->l('ID'), 'name' => $this->l('Name'), 'description' => $this->l('Description'), 'code' => $this->l('Code'), 'additionnalCharge' => $this->l('Additionnal charge (Euros)'), 'activated' => $this->l('Activated'), 'edit' => $this->l('edit'), 'delete' => $this->l('delete'), 'place' => $this->l('Place') - ); - - $smarty->assign('lang', $lang); - $this->_html .= '
'.$this->l('TNT Carrier Module Status').''; @@ -277,14 +265,23 @@ class TntCarrier extends CarrierModule $alert['shipping'] = 1; if ((Db::getInstance()->getValue('SELECT * FROM `'._DB_PREFIX_.'carrier` WHERE `external_module_name` = "'.$this->_moduleName.'" AND deleted = "0"')) < 1) $alert['service'] = 1; - if (!count($alert)) - $this->_html .= ''.$this->l('TNT Carrier is configured and online!').''; - else + if (count($alert) < 3) + { + $this->_html .= ''.$this->l('The following parameters are correctly configured and activated on your online store :').''; + $this->_html .= '
    '; + $this->_html .= (!isset($alert['account']) ? '
  • '.$this->l('TNT account. (Account setting tab)').'
  • ' : ''); + $this->_html .= (!isset($alert['shipping']) ? '
  • '.$this->l('Shipping address. (Shipping settings tab)').'
  • ' : ''); + $this->_html .= (!isset($alert['service']) ? '
  • '.$this->l('Choice of specific TNT delivery mode you want to offer to your customers. (Service settings tab)').'
  • ' : ''); + $this->_html .= '
'; + } + if (count($alert) > 0) { - $this->_html .= ''.$this->l('TNT Carrier is not configured yet, please:').''; - $this->_html .= '
'.(isset($alert['account']) ? '' : '').' '.$this->l('Make sure you have a tnt account.'); - $this->_html .= '
'.(isset($alert['shipping']) ? '' : '').' '.$this->l('Make sure you have a correct shipping address.'); - $this->_html .= '
'.(isset($alert['service']) ? '' : '').' '.$this->l('Make sure services are activated after a bill.'); + $this->_html .= ''.$this->l('The following parameters have to be configured to be able to use correctly the TNT module :').''; + $this->_html .= '
    '; + $this->_html .= (isset($alert['account']) ? '
  • '.$this->l('TNT account. (Account setting tab)').'
  • ' : ''); + $this->_html .= (isset($alert['shipping']) ? '
  • '.$this->l('Shipping address. (Shipping settings tab)').'
  • ' : ''); + $this->_html .= (isset($alert['service']) ? '
  • '.$this->l('Choice of specific TNT delivery mode you want to offer to your customers. (Service settings tab)').'
  • ' : ''); + $this->_html .= '
'; } $this->_html .= '
 
'; @@ -348,7 +345,7 @@ class TntCarrier extends CarrierModule foreach ($serviceList as $k => $v) { $serviceList[$k]['optionId'] = Configuration::get('TNT_CARRIER_'.$v['option'].'_ID'); - $serviceList[$k]['optionOvercost'] = Configuration::get('TNT_CARRIER_'.$v['option'].'_OVERCOST'); + $serviceList[$k]['optionOvercost'] = (Configuration::get('TNT_CARRIER_'.$v['option'].'_OVERCOST') ? Configuration::get('TNT_CARRIER_'.$v['option'].'_OVERCOST') : '0'); } $var = array('serviceList' => $serviceList, @@ -369,7 +366,7 @@ class TntCarrier extends CarrierModule $html = ' - add '.$this->l('New weight option').'

+ add '.$this->l('Add additional charges depending on the package weight').'

@@ -381,7 +378,7 @@ class TntCarrier extends CarrierModule $html .= ' - + - +
'.$this->l('ID').''.$this->l('Weight Min').''.$this->l('Weight Max').''.$this->l('Additionnal charge (Euros)').'
'.$v['id_'.$cat.''].' '.$v[''.$cat.'_min'].''.$v[''.$cat.'_max'].''.((float)$v[''.$cat.'_max'] == 0 ? '∞' : $v[''.$cat.'_max']).' '.$v['additionnal_charges'].' @@ -404,7 +401,7 @@ class TntCarrier extends CarrierModule $var = array( 'country' => $country, - 'overcost' => Configuration::get('TNT_CARRIER_'.strtoupper($country).'_OVERCOST'), + 'overcost' => (Configuration::get('TNT_CARRIER_'.strtoupper($country).'_OVERCOST') ? Configuration::get('TNT_CARRIER_'.strtoupper($country).'_OVERCOST') : '0'), 'action' => Tools::getValue('action'), 'section' => Tools::getValue('section'), 'getCountry' => Tools::getValue('country'), @@ -452,7 +449,7 @@ class TntCarrier extends CarrierModule { $info = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tnt_carrier_'.$cat.'` WHERE `id_'.$cat.'` = "'.$id.'"'); $info_min = $info[0][$cat.'_min']; - $info_max = $info[0][$cat.'_max']; + $info_max = ((float)$info[0][$cat.'_max'] == 0 ? '': $info[0][$cat.'_max']); $charge = $info[0]['additionnal_charges']; } @@ -461,13 +458,13 @@ class TntCarrier extends CarrierModule '.($id != null ? '' : '').' - + - +
'.$this->l('Weight min').''.$this->l('Weight max').''.$this->l('Additionnal charge').''.$this->l('Weight min').''.$this->l('Weight max (can be empty)').''.$this->l('Additionnal charge').'
'; @@ -511,7 +508,7 @@ class TntCarrier extends CarrierModule $password = Tools::getValue('tnt_carrier_password'); $number = Tools::getValue('tnt_carrier_number_account'); if (!$login || !$password || !$number) - $this->_postErrors[] = $this->l("All the fields are required"); + $this->_postErrors[] = $this->l('All the fields are required'); Configuration::updateValue('TNT_CARRIER_LOGIN', $login); Configuration::updateValue('TNT_CARRIER_PASSWORD', $password); Configuration::updateValue('TNT_CARRIER_NUMBER_ACCOUNT', $number); @@ -519,7 +516,7 @@ class TntCarrier extends CarrierModule private function _postValidationShipping() { - $collect = $email = Tools::getValue('tnt_carrier_shipping_collect'); + $collect = '1';//Tools::getValue('tnt_carrier_shipping_collect'); $company = Tools::getValue('tnt_carrier_shipping_company'); $pex = Tools::getValue('tnt_carrier_shipping_pex'); $lname = Tools::getValue('tnt_carrier_shipping_last_name'); @@ -535,23 +532,25 @@ class TntCarrier extends CarrierModule $print = Tools::getValue('tnt_carrier_print_sticker'); if (!$collect && $pex == '') - $this->_postErrors[] = $this->l("The pex code is missing"); + $this->_postErrors[] = $this->l('The pex code is missing'); if ($collect && $company == '') - $this->_postErrors[] = $this->l("Your company name is missing"); + $this->_postErrors[] = $this->l('Company name is missing'); if ($collect && !$lname) - $this->_postErrors[] = $this->l("Your last name is missing"); + $this->_postErrors[] = $this->l('Contact last name is missing'); if ($collect && !$fname) - $this->_postErrors[] = $this->l("Your first name is missing"); + $this->_postErrors[] = $this->l('Contact first name is missing'); if (!$address1) - $this->_postErrors[] = $this->l("Your address is missing"); + $this->_postErrors[] = $this->l('Address is missing'); + if (isset($address2) && strlen($address2) >= 32) + $this->_postErrors[] = $this->l('Address line 2 must be under 32 characters'); if (!$postal_code) - $this->_postErrors[] = $this->l("Your zip code is missing"); + $this->_postErrors[] = $this->l('Postal code is missing'); if (!$email) - $this->_postErrors[] = $this->l("Your email address is missing"); + $this->_postErrors[] = $this->l('Contact email address is missing'); if (!$phone) - $this->_postErrors[] = $this->l("Your phone number is missing"); + $this->_postErrors[] = $this->l('Contact phone number is missing'); if ($collect && $closing == '') - $this->_postErrors[] = $this->l("Your closing time is missing"); + $this->_postErrors[] = $this->l('Company closing time is missing'); Configuration::updateValue('TNT_CARRIER_SHIPPING_COLLECT', $collect); Configuration::updateValue('TNT_CARRIER_SHIPPING_COMPANY', $company); @@ -704,6 +703,11 @@ class TntCarrier extends CarrierModule Configuration::updateValue('TNT_CARRIER_'.strtoupper($country).'_OVERCOST', $overcost); } + public function get_followup($shipping_number) + { + return false; + } + /* ** Hook update carrier ** @@ -823,6 +827,7 @@ class TntCarrier extends CarrierModule $erreur = null; $follow = array(); $carrierName = Db::getInstance()->ExecuteS('SELECT external_module_name FROM `'._DB_PREFIX_.'carrier` WHERE `id_carrier` = "'.(int)($id_carrier).'"'); + if ($carrierName != null && $carrierName[0]['external_module_name'] == $this->_moduleName && $shipping_number != '') { $pack = new PackageTnt($params['order']->id); @@ -834,6 +839,10 @@ class TntCarrier extends CarrierModule public function hookupdateCarrier($params) { + $option = Db::getInstance()->ExecuteS('SELECT option + FROM `'._DB_PREFIX_.'tnt_carrier_option` + WHERE id_carrier = "'.(int)$params['id_carrier'].'"'); + Configuration::updateValue('TNT_CARRIER_'.$option[0]['option'].'_ID', (int)($params['carrier']->id)); } /* @@ -849,6 +858,8 @@ class TntCarrier extends CarrierModule public function getOrderShippingCost($params, $shipping_cost) { + if (!Tools::getValue('step')) + return false; if ((int)(Tools::getValue('step')) > 2) serviceCache::deleteServices($params->id); $product = $params->getProducts(); @@ -857,6 +868,7 @@ class TntCarrier extends CarrierModule $id_customer = $params->id_customer; $date_exp = $params->date_upd; $id_adress_delivery = $params->id_address_delivery; + $info = Db::getInstance()->ExecuteS('SELECT postcode, city, company FROM `'._DB_PREFIX_.'address` WHERE `id_address` = "'.(int)($id_adress_delivery).'"'); foreach($product as $k => $v) $weight += (float)($v['weight']); @@ -867,7 +879,6 @@ class TntCarrier extends CarrierModule return false; if (!Configuration::get('TNT_CARRIER_SHIPPING_ADDRESS1') || !Configuration::get('TNT_CARRIER_SHIPPING_ZIPCODE') || !Configuration::get('TNT_CARRIER_SHIPPING_CITY')) return false; - $info = Db::getInstance()->ExecuteS('SELECT postcode, city, company FROM `'._DB_PREFIX_.'address` WHERE `id_address` = "'.(int)($id_adress_delivery).'"'); $serviceCache = new serviceCache($params->id, $info[0]['postcode']); if (!$serviceCache->getFaisabilityAtThisTime()) @@ -902,18 +913,13 @@ class TntCarrier extends CarrierModule $priceCarrier = Configuration::get('TNT_CARRIER_'.$v['code'].'_OVERCOST'); } } - if (!isset($priceCarrier)) + if (!isset($priceCarrier)) { - if (isset($params->id_carrier) && (int)($params->id_carrier) > 0) - { - if ($option = Db::getInstance()->ExecuteS('SELECT `option` FROM `'._DB_PREFIX_.'tnt_carrier_option` WHERE `id_carrier` = "'.(int)($params->id_carrier).'"')) - $priceCarrier = Configuration::get('TNT_CARRIER_'.$option[0]['option'].'_OVERCOST'); - } - else - $priceCarrier = 0; + if ($option = Db::getInstance()->ExecuteS('SELECT `option` FROM `'._DB_PREFIX_.'tnt_carrier_option` WHERE `id_carrier` = "'.(int)($this->id_carrier).'"')) + $priceCarrier = Configuration::get('TNT_CARRIER_'.$option[0]['option'].'_OVERCOST'); } - - $weightLimit = Db::getInstance()->ExecuteS('SELECT additionnal_charges FROM `'._DB_PREFIX_.'tnt_carrier_weight` WHERE `weight_min` < "'.(float)($weight).'" AND `weight_max` > "'.(float)($weight).'"'); + $zero = 0; + $weightLimit = Db::getInstance()->ExecuteS('SELECT additionnal_charges FROM `'._DB_PREFIX_.'tnt_carrier_weight` WHERE `weight_min` < "'.(float)($weight).'" AND (`weight_max` > "'.(float)($weight).'" OR `weight_max` = "'.(float)$zero.'")'); $currency = Db::getInstance()->ExecuteS('SELECT conversion_rate FROM `'._DB_PREFIX_.'currency` WHERE `id_currency` = "'.(int)($params->id_currency).'"'); if ($weightLimit != null) $add += (float)($weightLimit[0]['additionnal_charges']); diff --git a/modules/tntcarrier/tpl/accountForm.tpl b/modules/tntcarrier/tpl/accountForm.tpl index 1a0818398..d82c8ca51 100644 --- a/modules/tntcarrier/tpl/accountForm.tpl +++ b/modules/tntcarrier/tpl/accountForm.tpl @@ -1,14 +1,13 @@ - -

{$lang.followParameters}. {$lang.registered} {$lang.here}

+

{l s='The following parameters were provided to you by TNT' mod='tntcarrier'}. {l s='If you are not yet registered, click ' mod='tntcarrier'} {l s='here' mod='tntcarrier'}

-

{$lang.accountTNT} :

- +

{l s='Account TNT' mod='tntcarrier'} :

+
- +
- +
-
-
\ No newline at end of file +
+ diff --git a/modules/tntcarrier/tpl/country.tpl b/modules/tntcarrier/tpl/country.tpl index 3d8a3afd4..e205a4428 100644 --- a/modules/tntcarrier/tpl/country.tpl +++ b/modules/tntcarrier/tpl/country.tpl @@ -1,12 +1,12 @@ - +
{$lang.place}{$lang.additionnalCharge}{l s='Place' mod='tntcarrier'}{l s='Additionnal charge(Euros)' mod='tntcarrier'}
{$varCountry.country}{$varCountry.overcost} - edit + edit
diff --git a/modules/tntcarrier/tpl/countryForm.tpl b/modules/tntcarrier/tpl/countryForm.tpl index ab335f76c..8c993bcf6 100644 --- a/modules/tntcarrier/tpl/countryForm.tpl +++ b/modules/tntcarrier/tpl/countryForm.tpl @@ -3,7 +3,7 @@
{$varCountryForm.country}
\ No newline at end of file diff --git a/modules/tntcarrier/tpl/follow.tpl b/modules/tntcarrier/tpl/follow.tpl index 9d58cead7..adea3e991 100644 --- a/modules/tntcarrier/tpl/follow.tpl +++ b/modules/tntcarrier/tpl/follow.tpl @@ -25,42 +25,41 @@ *}
-{$erreur} -{if !isset($erreur)} +{if isset($follow)} {foreach from="$follow" item="f"} - + - + - + - + - + - + - {if $f.request} - + @@ -68,7 +67,7 @@ {/if} {if $f.process} - + @@ -76,7 +75,7 @@ {/if} {if $f.delivery_departure} - + @@ -84,7 +83,7 @@ {/if} {if $f.delivery} - + @@ -97,7 +96,7 @@ {$line}
{/foreach} {if $f.linkPicture != ''} - {l s="proof signature"} + {l s='proof signature' mod='tntcarrier'} {/if} diff --git a/modules/tntcarrier/tpl/formerror.tpl b/modules/tntcarrier/tpl/formerror.tpl index 4130429a9..7e8378da8 100644 --- a/modules/tntcarrier/tpl/formerror.tpl +++ b/modules/tntcarrier/tpl/formerror.tpl @@ -26,17 +26,17 @@
{l s='Shipping information'} - {$var.error}
+
{if $var.weight} - {l s="The package weight must be between 0.1 and 30.0 kg"}

- {l s="Weight"} :

+ {l s='The package weight must be between 0.1 and 30.0 kg or call your TNT commercial' mod='tntcarrier'}

+ {l s='Weight' mod='tntcarrier'} :

{/if} {if $var.weightHidden}{/if} {if $var.date} - {l s="You must change the expedition date"}

- {l s="Date"} :

+ {l s='You must change the expedition date' mod='tntcarrier'}

+ {l s='Date' mod='tntcarrier'} :

{/if} {if $var.dateHidden}{/if} - {if !$var.dateHidden || !$var.weightHidden}{/if} + {if !$var.dateHidden || !$var.weightHidden}{/if}
\ No newline at end of file diff --git a/modules/tntcarrier/tpl/main.tpl b/modules/tntcarrier/tpl/main.tpl index 09780f1f1..f10d3f304 100644 --- a/modules/tntcarrier/tpl/main.tpl +++ b/modules/tntcarrier/tpl/main.tpl @@ -1,7 +1,7 @@
@@ -12,7 +12,7 @@
{l s="Package Information"}{l s='Package Information'}
{l s="Shipping number"}{l s='Shipping number'} {$f.number}{l s="Shipping status"}{l s='Shipping status'} {$f.status}
{l s="Reference"}{l s='Reference'} {$f.reference}{l s="Service"}{l s='Service'} {$f.service}
{l s="Weight"}{l s='Weight'} {$f.weight}
{l s="Event"} - {l s="Date"} - {l s="Hours"} - {l s="Name Center"} + {l s='Event'} + {l s='Date'} + {l s='Hours'} + {l s='Name Center'}
{l s="Package on request"}{l s='Package on request'} {$f.requestDate|date_format:$config.date} {$f.requestDate|date_format:$config.time}
{l s="Package on its way"}{l s='Package on its way'} {$f.process_date|date_format:$config.date} {$f.process_date|date_format:$config.time} {$f.process_center}
{l s="Deposit departure"}{l s='Deposit departure'} {$f.delivery_departure_date|date_format:$config.date} {$f.delivery_departure_date|date_format:$config.time} {$f.delivery_departure_center}
{l s="driver presentation"}{l s='driver presentation'} {$f.delivery_date|date_format:$config.date} {$f.delivery_date|date_format:$config.time}