diff --git a/admin-dev/index.php b/admin-dev/index.php index eef1dcc4e..fbf27d24e 100644 --- a/admin-dev/index.php +++ b/admin-dev/index.php @@ -47,7 +47,7 @@ if (empty($tab) and !sizeof($_POST)) $bread = ''; foreach ($tabs AS $key => $item) - $bread .= ' + $bread .= ' > '.((sizeof($tabs) - 1 > $key) ? '' : '').' diff --git a/admin-dev/tabs/AdminCurrencies.php b/admin-dev/tabs/AdminCurrencies.php index ff0953fc8..89e0391b9 100644 --- a/admin-dev/tabs/AdminCurrencies.php +++ b/admin-dev/tabs/AdminCurrencies.php @@ -172,7 +172,7 @@ class AdminCurrencies extends AdminTab
- * + *

'.$this->l('Will appear on Front Office, e.g., €, $').'...

diff --git a/admin-dev/tabs/AdminImport.php b/admin-dev/tabs/AdminImport.php index 13ebc669e..56540f5a6 100644 --- a/admin-dev/tabs/AdminImport.php +++ b/admin-dev/tabs/AdminImport.php @@ -605,7 +605,7 @@ class AdminImport extends AdminTab if (Tools::getValue('convert')) $line = $this->utf8_encode_array($line); $info = self::getMaskedRow($line); - if (array_key_exists('id', $info) AND (int)($info['id']) AND Product::existsInDatabase((int)($info['id']))) + if (array_key_exists('id', $info) AND (int)($info['id']) AND Product::existsInDatabase((int)($info['id']), 'product')) { $product = new Product((int)($info['id'])); $categoryData = Product::getProductCategories((int)($product->id)); @@ -753,7 +753,7 @@ class AdminImport extends AdminTab $product->quantity = 0; // If id product AND id product already in base, trying to update - if ($product->id AND Product::existsInDatabase((int)($product->id))) + if ($product->id AND Product::existsInDatabase((int)($product->id), 'product')) { $datas = Db::getInstance()->getRow('SELECT `date_add` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)($product->id)); @@ -1192,7 +1192,7 @@ class AdminImport extends AdminTab self::setDefaultValues($info); - if (array_key_exists('id', $info) AND (int)($info['id']) AND Manufacturer::existsInDatabase((int)($info['id']))) + if (array_key_exists('id', $info) AND (int)($info['id']) AND Manufacturer::existsInDatabase((int)($info['id']), 'manufacturer')) $manufacturer = new Manufacturer((int)($info['id'])); else $manufacturer = new Manufacturer(); @@ -1247,7 +1247,7 @@ class AdminImport extends AdminTab self::setDefaultValues($info); - if (array_key_exists('id', $info) AND (int)($info['id']) AND Supplier::existsInDatabase((int)($info['id']))) + if (array_key_exists('id', $info) AND (int)($info['id']) AND Supplier::existsInDatabase((int)($info['id']), 'supplier')) $supplier = new Supplier((int)($info['id'])); else $supplier = new Supplier(); diff --git a/classes/AddressFormat.php b/classes/AddressFormat.php index 425dd12f1..50c70f109 100644 --- a/classes/AddressFormat.php +++ b/classes/AddressFormat.php @@ -213,7 +213,7 @@ class AddressFormatCore extends ObjectModel $usedKeyList[] = $patternName; } else - $this->_errorFormatList[] = Tools::displayError('This key is used too many times (once allowed'). + $this->_errorFormatList[] = Tools::displayError('This key is used too many times (once allowed)'). ': '.$patternName; } } diff --git a/classes/CompareProduct.php b/classes/CompareProduct.php index af3129b22..e88c34bab 100644 --- a/classes/CompareProduct.php +++ b/classes/CompareProduct.php @@ -69,6 +69,7 @@ class CompareProduct extends ObjectModel $compareProducts = null; + if ($results) foreach($results as $result) $compareProducts[] = $result['id_product']; @@ -129,6 +130,7 @@ class CompareProduct extends ObjectModel $compareProducts = null; + if ($results) foreach($results as $result) $compareProducts[] = $result['id_product']; diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 855933024..ad3977243 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -860,12 +860,12 @@ abstract class ObjectModelCore * @param $id_entity entity id * @return boolean */ - public static function existsInDatabase($id_entity) + public static function existsInDatabase($id_entity, $table) { $row = Db::getInstance()->getRow(' - SELECT `id_'.self::$table.'` - FROM `'._DB_PREFIX_.self::$table.'` e - WHERE e.`id_'.self::$table.'` = '.(int)($id_entity)); + SELECT `id_'.$table.'` + FROM `'._DB_PREFIX_.$table.'` e + WHERE e.`id_'.$table.'` = '.(int)($id_entity)); return isset($row['id_product']); } diff --git a/classes/Product.php b/classes/Product.php index b96a91d27..f254587ee 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2780,6 +2780,7 @@ class ProductCore extends ObjectModel public static function getProductsProperties($id_lang, $query_result) { $resultsArray = array(); + if(is_array($query_result)) foreach ($query_result AS $row) if ($row2 = Product::getProductProperties($id_lang, $row)) $resultsArray[] = $row2; diff --git a/modules/cashticket/PrepaidServices.php b/modules/cashticket/PrepaidServices.php index 479cebbb1..ce1c4694d 100644 --- a/modules/cashticket/PrepaidServices.php +++ b/modules/cashticket/PrepaidServices.php @@ -297,6 +297,14 @@ abstract class PrepaidServices extends PaymentModule foreach ($this->_getAllowedCurrencies() AS $currency) { + $mid = Configuration::get($this->prefix.'MERCHANT_ID_'.$currency['iso_code']); + $certificateExiste = ''; + $passwordExist = ''; + if (file_exists($this->certificat_dir.$mid.'.pem')) + $certificateExiste = '
'.$this->l('A certificate has been found for this configuration').' : '.$mid.'.pem'.'

'; + if (Configuration::get($this->prefix.'KEYRING_PW_'.$currency['iso_code'])) + $passwordExist = '
'.$this->l('A password has already been saved'); + $currencies_configuration .= ' '.$this->getL('configuration_in').' '.$currency['name'].' '.$currency['sign'].' @@ -310,10 +318,12 @@ abstract class PrepaidServices extends PaymentModule
+ '.$certificateExiste.'
- +
+ '.$passwordExist.' '; } @@ -511,6 +521,11 @@ abstract class PrepaidServices extends PaymentModule $mid = trim(Tools::getValue('ct_merchant_id_'.$currency['iso_code'])); Configuration::updateValue($this->prefix.'MERCHANT_ID_'.$currency['iso_code'], $mid); + + $pass = Tools::getValue('ct_keyring_pw_'.$currency['iso_code']); + if (!empty($pass)) + Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code'])); + Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code'])); if (isset($_FILES['ct_keyring_certificate_'.$currency['iso_code']])) @@ -556,7 +571,7 @@ abstract class PrepaidServices extends PaymentModule 'payment_name' => $this->displayName, 'module_name' => $this->name)); - return $this->display(__FILE__, 'payment.tpl'); + return $this->display(dirname(__FILE__), 'payment.tpl'); } diff --git a/modules/cashticket/PrepaidServicesAPI.php b/modules/cashticket/PrepaidServicesAPI.php index 8c697732b..991845353 100644 --- a/modules/cashticket/PrepaidServicesAPI.php +++ b/modules/cashticket/PrepaidServicesAPI.php @@ -71,7 +71,9 @@ class PrepaidServicesAPI $data_array = explode("\n", $data,7); $resultcode = trim($data_array[0]); $errorcode = trim($data_array[1]); - $errormessage = trim($data_array[2]); + //$errormessage = trim($data_array[2]); + // Todo : Find a way to have translation + $errormessage = 'Transaction could not be initiated due to connection problems. If the problem persists, please contact our support.'; return array($resultcode, $errorcode, $errormessage); } @@ -155,8 +157,10 @@ class PrepaidServicesAPI $dataarray=explode("\n", $data,7); $resultcode=trim($dataarray[0]); $errorcode=trim($dataarray[1]); - $errormessage=trim($dataarray[2]); + //$errormessage=trim($dataarray[2]); + $errormessage = 'The transaction could not be completed. This may have happened due to a temporary connection problem.'. + ' Please press the "reload" button in your browser or the link below to reload this page to retry completing your transaction. '; return array ($resultcode, $errorcode, $errormessage); } else diff --git a/modules/cashticket/it.php b/modules/cashticket/it.php index 72724f406..c7b57c903 100644 --- a/modules/cashticket/it.php +++ b/modules/cashticket/it.php @@ -12,9 +12,6 @@ $_MODULE['<{cashticket}prestashop>cashticket-confirmation_2c987f462c2ab7fc63e061 $_MODULE['<{cashticket}prestashop>cashticket-confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Il tuo ordine verrà inviato al più presto.'; $_MODULE['<{cashticket}prestashop>cashticket-confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra'; $_MODULE['<{cashticket}prestashop>cashticket-confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti'; -$_MODULE['<{cashticket}prestashop>disposition-error_393988def796f78c4b673b90548f3afa'] = 'Stato della disposizione non valido'; -$_MODULE['<{cashticket}prestashop>disposition-error_5db89f2bf67f2c7dbd86cac101c3c1b8'] = '. Non sei autorizzato ad effettuare il pagamento.'; -$_MODULE['<{cashticket}prestashop>payment_da9c72b9e543135f3f59e3c8ac68ef35'] = 'Paga con'; $_MODULE['<{cashticket}prestashop>cashticket_4512bbd48918c03027387a6c8e911342'] = 'CashTicket'; $_MODULE['<{cashticket}prestashop>cashticket_21d3d890383dc93343ce57c221ce5b3d'] = 'Si accettano pagamenti tramite CashTicket'; $_MODULE['<{cashticket}prestashop>cashticket_bed51f5187d4bf98e08f44d93f3098d9'] = 'Disposizione creata. In attesa di addebito.'; @@ -49,5 +46,6 @@ $_MODULE['<{cashticket}prestashop>cashticket_d929c5e5e5643c622400e837914206da'] $_MODULE['<{cashticket}prestashop>cashticket_d59048f21fd887ad520398ce677be586'] = 'Per saperne di più'; $_MODULE['<{cashticket}prestashop>cashticket_930320ced1b8c376237844049b570a7f'] = 'Si verificato un errore, controlla i messaggi per maggiori informazioni'; $_MODULE['<{cashticket}prestashop>cashticket_a9ced76f2dd6907220fa95b3a136b04a'] = 'Importo non valido'; - -?> \ No newline at end of file +$_MODULE['<{cashticket}prestashop>disposition-error_393988def796f78c4b673b90548f3afa'] = 'Stato della disposizione non valido'; +$_MODULE['<{cashticket}prestashop>disposition-error_5db89f2bf67f2c7dbd86cac101c3c1b8'] = '. Non sei autorizzato ad effettuare il pagamento.'; +$_MODULE['<{cashticket}prestashop>payment_da9c72b9e543135f3f59e3c8ac68ef35'] = 'Paga con'; diff --git a/modules/ebay/eBayRequest.php b/modules/ebay/eBayRequest.php index a626bda57..dd127ae69 100755 --- a/modules/ebay/eBayRequest.php +++ b/modules/ebay/eBayRequest.php @@ -1009,7 +1009,7 @@ class eBayRequest { $id_product = Db::getInstance()->getValue(' SELECT `id_product` FROM `'._DB_PREFIX_.'product` - WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' + WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' OR `reference` = \''.pSQL((string)$transaction->SellingManagerProductDetails->CustomLabel).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->CustomLabel).'\''); if ((int)$id_product > 0) $itemList[] = array('id_product' => $id_product, 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice); @@ -1017,7 +1017,7 @@ class eBayRequest { $row = Db::getInstance()->getValue(' SELECT `id_product`, `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` - WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' + WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' OR `reference` = \''.pSQL((string)$transaction->SellingManagerProductDetails->CustomLabel).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->CustomLabel).'\''); if ((int)$row['id_product'] > 0) $itemList[] = array('id_product' => $row['id_product'], 'id_product_attribute' => $row['id_product_attribute'], 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice); diff --git a/modules/ebay/ebay.php b/modules/ebay/ebay.php index 9319aaf7f..5a52250df 100755 --- a/modules/ebay/ebay.php +++ b/modules/ebay/ebay.php @@ -90,6 +90,13 @@ class Ebay extends Module if (!Configuration::get('EBAY_SECURITY_TOKEN')) Configuration::updateValue('EBAY_SECURITY_TOKEN', Tools::passwdGen(30)); + /* For 1.4.3 and less compatibility */ + $updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT'); + if (!Configuration::get('PS_OS_PAYMENT')) + foreach ($updateConfig as $u) + if (!Configuration::get($u) && defined('_'.$u.'_')) + Configuration::updateValue($u, constant('_'.$u.'_')); + // Check if installed if (self::isInstalled($this->name)) { @@ -311,7 +318,7 @@ class Ebay extends Module if (Configuration::get('EBAY_ORDER_LAST_UPDATE') < date('Y-m-d', strtotime('-45 minutes')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z') { $ebay = new eBayRequest(); - $orderList = $ebay->getOrders(date('Y-m-d', strtotime('-90 days')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z', $dateNew); + $orderList = $ebay->getOrders(date('Y-m-d', strtotime('-30 days')).'T'.date('H:i:s', strtotime('-30 days')).'.000Z', $dateNew); if ($orderList) foreach ($orderList as $order) diff --git a/modules/mondialrelay/classes/MRGetRelayPoint.php b/modules/mondialrelay/classes/MRGetRelayPoint.php index 6c43f34af..d5b0bbc19 100755 --- a/modules/mondialrelay/classes/MRGetRelayPoint.php +++ b/modules/mondialrelay/classes/MRGetRelayPoint.php @@ -188,8 +188,20 @@ class MRGetRelayPoint implements IMondialRelayWSMethod // Clean Content foreach($result as &$relayPoint) + { + $totalEmptyFields = 0; foreach ($relayPoint as $key => &$value) + { $value = trim($value); + if (empty($value)) + ++$totalEmptyFields; + } + if ($totalEmptyFields == count($relayPoint)) + { + $errors[] = $this->_mondialRelay->l('MondialRelay can\'t find any relay point near your address. Maybe your address isn\'t properly filled ?'); + break; + } + } $success = $result; } $this->_resultList['error'] = $errors; diff --git a/modules/mondialrelay/fr.php b/modules/mondialrelay/fr.php index d34a1609e..255b89ae3 100755 --- a/modules/mondialrelay/fr.php +++ b/modules/mondialrelay/fr.php @@ -81,8 +81,11 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_907eba32d950bfab68227fd7ea22999 $_MODULE['<{mondialrelay}prestashop>mondialrelay_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des tranporteurs'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_8596361cec00f8d2438d264827eee737'] = 'Modification de la configuration'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_c437cbdaa5799236b2f5b07634679e3d'] = 'Personnalisation des champs'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_0eddbda2340214e74be063ed1d1af8a0'] = 'Adresse principale'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_759e1f68a70bbe8c48eb30fa4b512de8'] = 'Il semblerait que vous venez de mettre à jour Mondial Relay sans avoir réinitialisé le module : il est requis de configurer les champs ci-dessous afin de pouvoir générer les étiquettes'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_1d1d57f5840e1da871622295ba206b30'] = 'Cliquez pour afficher / cacher les options'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bbd9bc77f1f5b6a9edce6db062b607c9'] = 'Cette partie permet de réécrire les données envoyées à Mondial Relay lorsque vous lancez le processus de génération de tickets. Certains champs sont assez restrictifs en terme de longueur ou de caractères utilisés.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9127fe218b2cac7f0c8aecd7016a891d'] = 'Nom de la boutique'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_7e9bbecd32836500b557db33c3b3e93b'] = 'La clé utilisée par Mondialrelay est'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_32963eea43914b6a418fb2fd9850beb9'] = 'et elle contient comme valeur par défaut'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; @@ -90,13 +93,8 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_f4f70727dc34561dfde1a3c529b6205 $_MODULE['<{mondialrelay}prestashop>mondialrelay_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'Etat des commandes'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_818f954f4838ecad839c5dcbd287d291'] = 'Choississez le statut pour la génération d\'étiquette. Vous pouvez administrer vos étiquettes sur'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_5117e194c641ad4fc55417b554aead3c'] = 'la page d\'administration de Mondial Relay'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_235072af42d72915159f0e6c9d6a870c'] = 'Google map'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; -$_MODULE['<{mondialrelay}prestashop>mondialrelay_9c5c09beb32c36129b857c2a40c861b6'] = 'Affiche une Google map sur votre transporteur Mondial Relay, mais votre page de sélection du transporteur peut devenir plus lente.'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_1ba3935c9858ffb8e19a35ca640b8505'] = 'Paramètres du compte Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_a125105400f6e4ee4574da3793af5ef2'] = 'Ces paramẻtres sont fournis par Mondial Relay lors de la souscription à leur service'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_12a3fbd35c1cab4b1101b91d708efd15'] = 'Enseigne Webservice:'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_6f0434b67007b555dfd1201f4e0d5254'] = 'Code marque:'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_08f785193c96b2a78dec8d76a46648d6'] = 'Clé Webservice:'; @@ -109,6 +107,8 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e4329 $_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL du suivi'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nombre de Points Relais'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_91b442d385b54e1418d81adc34871053'] = 'Sélectionné'; $_MODULE['<{mondialrelay}prestashop>orderdetail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison à'; $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande'; $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; @@ -120,20 +120,24 @@ $_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>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'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Il y a une erreur numéro'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détail :'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay ne peux trouver aucun point relais proche de votre adresse. Peut etre que votre adresse n\'est pas correctement rempli ?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice MondialRelay n\'est pas joignable'; $_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; $_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; $_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête soit invalide :'; $_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; $_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; $_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; -$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certains objets ne peuvent pas être retirés, veuillez réessayez un peu plus tard.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_77bad09c976ec16f38381dc220139367'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller'; +$_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>recherchedetailpointrelais_ajax_03f4a47830f97377a35321051685071e'] = 'Fermé'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_796c163589f295373e171842f37265d5'] = 'Mercredi'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche'; -$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_621895c388c9bb22abbbc69fad001846'] = 'Sélectionnez ce point relais'; diff --git a/modules/mondialrelay/mondialrelay.js b/modules/mondialrelay/mondialrelay.js index 426bb42c9..a7d20d7ab 100755 --- a/modules/mondialrelay/mondialrelay.js +++ b/modules/mondialrelay/mondialrelay.js @@ -516,6 +516,21 @@ function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) } } +function PS_MRDisplayErrorRelayPoint(errorList, blockContent) +{ + + blockContent.fadeOut('fast', function() + { + console.log($(this)); + $(this).children('td').html(''); + for (numError in errorList) + { + $('
' + errorList[numError] + '
').appendTo($(this).children('td')); + } + $(this).fadeIn('fast'); + }); +} + // Fetch the relay point function PS_MRFetchRelayPoint(carrierSelected) { @@ -542,7 +557,9 @@ function PS_MRFetchRelayPoint(carrierSelected) dataType: 'json', success: function(json) { - if (json && json.success) + if (json && json.error && json.error.length) + PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id)); + else if (json && json.success) PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id); }, error: function(xhr, ajaxOptions, thrownError) @@ -737,6 +754,7 @@ function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid) return false; } + $(document).ready(function() { $('#toggleStatusOrderList').click(function() @@ -755,6 +773,10 @@ $(document).ready(function() { deleteSelectedHistories(); }); + $('#PS_MRDisplayPersonalizedOptions').click(function() + { + $('#PS_MRPersonalizedFields').toggle('fast'); +}); }); diff --git a/modules/mondialrelay/mondialrelay.php b/modules/mondialrelay/mondialrelay.php index b2db68dfd..63c778319 100755 --- a/modules/mondialrelay/mondialrelay.php +++ b/modules/mondialrelay/mondialrelay.php @@ -920,18 +920,22 @@ class MondialRelay extends Module 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'). + $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 = '
'; $form .= '
- '.$this->l('Fields personalization'). + '.$this->l('Advanced Settings'). ' - + '.$this->l('Click to display / hide the options').' '. ''. $warn.' - +
+
+ - '.$this->l('This part allow to override the data sent at MondialRelay when you want to generate Ticket. Some fields are restricted by the length, or forbidden char').'. +
+

'.$this->l('The key used by Mondialrelay is').' Expe_ad1 '.$this->l('and has this default value').' @@ -941,6 +945,8 @@ class MondialRelay extends Module

+
+

'; return $form; } @@ -968,15 +974,7 @@ class MondialRelay extends Module $output .= ''. $this->l('the Mondial Relay administration page').'

'; $output .= '
-
- -
- - - - -

'.$this->l('Displaying a google map on your Mondial Relay carrier may make carrier page loading slower.').'

-
'; +
'; $output .= '
'; $output .= '
'; @@ -990,6 +988,9 @@ class MondialRelay extends Module
'.$this->l('Mondial Relay Account Settings').' +
+ - '.$this->l('These parameters are provided by Mondial Relay once you subscribed to their service').' +