Lyzou Posted October 26, 2012 Share Posted October 26, 2012 Bonjour Je savais le faire sur les versions précédentes mais pas sous la toute dernière de Prestashop... J'ai été dans classes/address.php et modifié ce passage : */ public static $definition = array( 'table' => 'address', 'primary' => 'id_address', 'fields' => array( 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', '[b][color=#ff0000]required' => false[/color][/b]), 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId'), 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 32), 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', '[color=#ff0000][b]required' => false[/b][/color], 'size' => 32), 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'vat_number' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', '[color=#ff0000][b]required' => false[/b][/color], 'size' => 128), 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', '[color=#ff0000][b]required' => false[/b][/color], 'size' => 12), 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', '[color=#ff0000][b]required' => false[/b][/color], 'size' => 64), 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), 'dni' => array('type' => self::TYPE_STRING, 'validate' => 'isDniLite', 'size' => 16), 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), ), ); Maintenant quand il faut donner ces renseignements pour créer un compte, il insiste absolument pour dire qu'un code postal est nécéssaire... Quelqu'un saurait m'aider s'il vous plait? Link to comment Share on other sites More sharing options...
Lyzou Posted October 26, 2012 Author Share Posted October 26, 2012 Ok trouvé donc je fais partager : Dans le menu Localisation > Pays : vous cherchez après "France". Dans le formulaire, vous décochez "Requiert code postal". Link to comment Share on other sites More sharing options...
LEBRUN Posted October 30, 2012 Share Posted October 30, 2012 J'utilise Prestashop 1.5.0.17 et malheureusement, j'ai essayé les transformations indiquées et cela ne marche pas... Quelle version de Prestashop utilisez-vous? Merci pour votre réponse car je vends des produits téléchargeables sur mon site et j'essaie vainement de supprimer certains champs obligatoires Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now