From 983777239f356f48fc962d05e6cd9757dfcd4dec Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Mon, 13 Feb 2012 10:42:03 +0000 Subject: [PATCH] [-] FO : #PSTEST-733 - Fix bug with redirection after address creation on multishipping mode git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13250 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/front/AddressController.php | 9 +++++++++ themes/default/order-address-multishipping.tpl | 4 ++-- translations/fr/errors.php | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php index 1b3002629..37d9bbceb 100644 --- a/controllers/front/AddressController.php +++ b/controllers/front/AddressController.php @@ -175,6 +175,15 @@ class AddressControllerCore extends FrontController $this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.'); else if (!$country->isNeedDni()) $address->dni = null; + + // Check if the alias exists + if (!empty($_POST['alias']) + && (int)$this->context->customer->id > 0 + && Db::getInstance()->getValue(' + SELECT count(*) + FROM '._DB_PREFIX_.'address + WHERE `alias` = \''.pSql($_POST['alias']).'\' AND id_customer = '.(int)$this->context->customer->id) > 0) + $this->errors[] = sprintf(Tools::displayError('The alias "%s" is already used, please chose an other one.'), Tools::safeOutput($_POST['alias'])); // Don't continue this process if we have errors ! if ($this->errors && !Tools::isSubmit('ajax')) diff --git a/themes/default/order-address-multishipping.tpl b/themes/default/order-address-multishipping.tpl index 9b9e80074..473a622d2 100644 --- a/themes/default/order-address-multishipping.tpl +++ b/themes/default/order-address-multishipping.tpl @@ -178,7 +178,7 @@ {/section} {else} - {l s='Add a new address'} + {l s='Add a new address'} {/if}

@@ -186,7 +186,7 @@

- » {l s='Add a new address'} + » {l s='Add a new address'}

{if !$opc}
diff --git a/translations/fr/errors.php b/translations/fr/errors.php index b3bcd74d5..dfbaeafaf 100644 --- a/translations/fr/errors.php +++ b/translations/fr/errors.php @@ -140,6 +140,7 @@ $_ERRORS['044ef92a14ceaaba24382a72ca0267ae'] = 'Ce pays requiert la sélection d $_ERRORS['3d825cbfa93b2c0e9ea93bbcab328fe0'] = 'Code postal'; $_ERRORS['e8f638d8907833cbcead6ba01dd2a954'] = 'Il doit être typé comme suit:'; $_ERRORS['2c5a3ea86d2f2f29d953d1a3d034a417'] = 'Le numéro d\'identification est incorrect ou a déjà été utilisé.'; +$_ERRORS['33a426f45954d889921a8a89b1194914'] = 'Le titre \"%s\" est déjà utilisé, merci d\'en choisir un autre.'; $_ERRORS['6b9041eb853a3cf9b47f13f53b70f51a'] = 'Une erreur est survenue lors de la mise à jour de votre adresse.'; $_ERRORS['28ca4ab8455ffa19e6f0577aefa9f1c9'] = 'Client introuvable'; $_ERRORS['637976ed39a990f58f8a3650eac0ff08'] = 'Adresse email requise'; @@ -390,13 +391,13 @@ $_ERRORS['dc4b45d6ded64ffc6cfcec146a2b0bf5'] = 'Contrôlleur introuvable'; $_ERRORS['5421db7177e5dc293af3f2565811888a'] = 'Objets non valides'; $_ERRORS['a7b770c4221d81830ac09059e16083a8'] = 'L\'ID de l\'OrderCarrier est invalide'; $_ERRORS['3a636d6a7d184e869fa5b2c05849214b'] = 'Numéro de suivi incorrect'; +$_ERRORS['ddccb08d56c9ba148a1e395c2a0901df'] = 'une erreur est survenue lors de l\'envoi de l\'e-mail au client'; $_ERRORS['75bc8684cb9fc4f73f254270141f0c9b'] = 'L\'OrderCarrier ne peut être mis à jour'; $_ERRORS['e1e95b3cea70730a922b35808ca3dce3'] = 'Statut de commande invalide'; $_ERRORS['ae831e16712dd5e3b49c1f10c1d4f3c0'] = 'une erreur est survenue lors du changement de statut et/ou de l\'envoi de l\'e-mail au client'; $_ERRORS['8934d0647dcf8c73fd668161c30002d6'] = 'Cette commande a déjà ce statut'; $_ERRORS['ecd7aa91bf7a1cf55a0d3dbd8c0c6463'] = 'Le client est invalide'; $_ERRORS['70f4b635847038d056e33959821a7a66'] = 'caractères max'; -$_ERRORS['ddccb08d56c9ba148a1e395c2a0901df'] = 'une erreur est survenue lors de l\'envoi de l\'e-mail au client'; $_ERRORS['ec995e6aa93ad0264c5593d9d76edbe3'] = 'Impossible de générer un remboursement partiel'; $_ERRORS['780e67070a71f981346201c4810dc9d4'] = 'Vous devez saisir un montant si vous voulez créer un remboursement partiel'; $_ERRORS['7f3f9fec825792f2b728db9d55078e80'] = 'Aucune quantité sélectionnée pour le produit.';