This project is not covered by Drupal’s security advisory policy.
The UK's Royal Mail categorises destinations as falling into four zones across the world: the UK, Europe, world zone 1, and world zone 2. The Royal Mail zones module makes it easy to check which zone a country's in. Note that by this definition the UK isn't in Europe, which might seem counter-intuitive at first.
This module doesn't
- integrate with any Royal Mail APIs (if there are any);
- provide Royal Mail shipping pricing rules.
There are two Rule conditions provided:
- Country is in Royal Mail zone: This takes the country and zone as text inputs.
- Order address is in Royal Mail zone: This takes the country, a Commerce Order, and the address you're interested in (eg. shipping). Requires Commerce.
All countries are specified as two letter ISO 3166-1 alpha-2 country codes (eg. GB). The following test functions all accept a country code and return a boolean value.
module_load_include('inc', 'rmzone'); rmzone_country_in_uk($country); rmzone_country_in_europe($country); rmzone_country_in_world_zone_1($country); rmzone_country_in_world_zone_2($country); rmzone_country_in_zone($country, $zone);
The following function returns the zone of the given country, where the zone is one of:
- world zone 1
- world zone 2
module_load_include('inc', 'rmzone'); rmzone_country_get_zone($country);
The following funtions all return an array with matching key value pairs of country codes.
module_load_include('inc', 'rmzone'); rmzone_countries_uk(); rmzone_countries_europe(); rmzone_countries_world_zone_1(); rmzone_countries_world_zone_2();
- Maintenance status: Actively maintained
- Development status: Maintenance fixes only
- Module categories: E-commerce, Rules
- Reported installs: 54 sites currently report using this module. View usage statistics.
- Downloads: 964
- Last modified: November 28, 2014
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.