Download the PHP package silvercommerce/geozones without Composer
On this page you can find all versions of the php package silvercommerce/geozones. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download silvercommerce/geozones
More information about silvercommerce/geozones
Files in silvercommerce/geozones
Package geozones
Short Description Add generic 'geo-zones' a full list of country specific regions and the ability to categorise them into zones
License BSD-3-Clause
Homepage https://github.com/silvercommerce/geozones
Informations about the package geozones
SilverCommerce GeoZones
Adds a list of ISO-3166-2 "Subdivisions" and allows for these to be divided up into "Zones" (which can be used for geographical identicifation)
The initial list is generated based on data provided by the Debian project. more at:
https://salsa.debian.org/iso-codes-team/iso-codes/blob/master/data/iso_3166-2.json
NOTE This module just provides data that you can then work with on your SilverStripe project.
Instalation
Easiest is to install via composer:
composer require silvercommerce/geozones
Setup
All GeoZone settings are linked to SiteConfig
, to setup new Zones, or add new regions, you can
do this by visit site settings and selecting the "GeoZones" tab.
Region Selection Field
This module also provides a RegionSelectionField
which is a simple ajax powered form
field that can be used to filter the regions list by a pre-defined country code.
You can add a RegionSelectionField
to your code via the following:
NOTE You must add a field to the same form that is responsible for setting a valid
country code (ISO 3166 2 character) for RegionSelectionField
to work.