Jump to content

Livraison par ville


Recommended Posts

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

  • 2 weeks later...

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...