[-] FO : #PSFV-522 - Bug in AddressController with Address Alias

This commit is contained in:
mDeflotte
2012-02-16 09:19:30 +00:00
parent 4cf379c44a
commit e37e7e2a41
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -182,7 +182,10 @@ class AddressControllerCore extends FrontController
&& Db::getInstance()->getValue('
SELECT count(*)
FROM '._DB_PREFIX_.'address
WHERE `alias` = \''.pSql($_POST['alias']).'\' AND id_customer = '.(int)$this->context->customer->id) > 0)
WHERE `alias` = \''.pSql($_POST['alias']).'\'
AND id_address != '.(int)Tools::getValue('id_address').'
AND id_customer = '.(int)$this->context->customer->id.'
AND deleted = 0') > 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 !