← All modules

Magento 2 module

Customer Address Countries

Separate countries for shipping and billing addresses: ship to the countries you deliver to, bill to every country of the European Union.

Also known as: different countries for billing and shipping, billing address in all EU countries, EU geo-blocking regulation, allowed countries per address type

Magento has a single list of allowed countries for all addresses. A shop that only delivers to some countries can then only accept customers whose billing address is in one of these countries too. This module allows billing addresses in the countries of the European Union and keeps shipping addresses in the countries you deliver to, in the checkout and in the customer account. That is what the EU geo-blocking regulation asks of shops that sell to customers of all member states.

Features

  • The checkout offers the countries you deliver to for the shipping address and the countries of the European Union for the billing address, with their regions.
  • Logged-in customers only see their saved addresses whose country fits: the shipping step lists the addresses in countries you deliver to, the billing address selection those in billing countries.
  • The default or only address of a customer is only selected as shipping address if you deliver to its country; otherwise the checkout shows the form for a new shipping address.
  • The address book offers all these countries and only lets an address be the default shipping or billing address if its country is allowed for that type of address.
  • The server checks the countries again when the shipping step is saved and before the order is placed, also in checkouts like PayPal Express.

Configuration

Go to Stores > Configuration > Infrangible Solutions > Customer Address Countries > General > Enable (per website and store view). The countries come from General > General > Country Options:

  • “Allow Countries”: the countries for shipping addresses.
  • “European Union Countries”: the countries for billing addresses. If this list is empty, billing addresses use the same countries as shipping addresses.

Good to know

  • The module works with Magento’s standard (Luma-based) checkout; checkouts that replace its address components can use the module’s filtered address lists.
  • The setting of the predecessor module Tofex Customer Non-Discrimination is not taken over; enable the module again after switching.

Installation

Install the module with Composer in your Magento root directory:

composer require infrangible/m2-customer-address-countries

Then enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.