Franck18 Posted September 14, 2020 Share Posted September 14, 2020 Bonjour, Savez-vous si nous pouvons limiter les commande en livraison Exemple nous livrions que la ville de Lyon (donc les client hors Lyon ne peuvent pas passer commande) merci d'avance. Link to comment Share on other sites More sharing options...
Eolia Posted September 14, 2020 Share Posted September 14, 2020 Pour votre cas particulier (peu de codes postaux à restreindre) il suffit de mettre une condition dans la fonction _processCarrier() de ParentOrderController.php if (isset($this->context->customer->id) && $this->context->customer->id) { $address = new Address((int)$this->context->cart->id_address_delivery); if (!($id_zone = Address::getZoneById($address->id))) { $this->errors[] = Tools::displayError('No zone matches your address.'); } elseif (!in_array(array(69000, 69001, 69002, 69003, 69004, 69005, 69006, 69007, 69008, 69009), $address->postcode)) { $this->errors[] = Tools::displayError('We are sorry but we only deliver to the city of Lyon.'); } } else { $id_zone = (int)Country::getIdZone((int)Tools::getCountry()); } Sinon il faut envisager l'achat d'un module spécifique. Link to comment Share on other sites More sharing options...
Franck18 Posted September 14, 2020 Author Share Posted September 14, 2020 La traduction de We are sorry but we only deliver to the city of Lyon, il faut le faire sur le tableau de bord du site ou directement dans le fichier Il faut le mettre dans le fichier (voir image joint). a la fin du fichier ? Link to comment Share on other sites More sharing options...
Franck18 Posted September 14, 2020 Author Share Posted September 14, 2020 Link to comment Share on other sites More sharing options...
Franck18 Posted September 25, 2020 Author Share Posted September 25, 2020 Bonjour Eolia, Vous avez un module à conseiller ? Merci. 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