Jump to content

Recommended Posts


je cherche à rendre alias d’adresse est unique pour le client

c 'est à dire un client ne peux pas avoir deux alias égaux.





Share this post

Link to post
Share on other sites

j'ai trouvé une solution :

ajouter ces lignes dans CustomerAddressForm.php

if ( $aliasField = $this->getField('alias')) {
			//$customer = $this->getCustomer();
			$coun = Address::aliasExist($aliasField->getValue(),1,$this->getField('id_customer')->getValue());
			if ($coun > 0) {
                    'The alias "%s" has already been used. Please select another one', array(), 'Shop.Notifications.Error'
			 $is_valid = false;

il y a t il un override CustomerAddressFormCore ?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More