Geo Zones

Tytuł

OldNew
1Geo Zones Geo Zones1Geo Zones

Bezpośrednie łącze

OldNew
1admin/geo_zones_geo_zones1geo_zones

zawartość

OldNew
1# Admin:geo_zones/geo_zones1# Geo Zones
22
3 **Geo zones** or geographical zones are custom groups of3 **Geo zones** or geographical zones are custom groups of [countries](countries) and/or [zones](zones)/states/provinces. They can for example be used to allow/disallow functionality to a certain region like [shipping options](shipping_modules) or define [tax rates](tax_rates).
4 [countries](countries) and/or4
5 [zones](zones)/states/provinces. They can for example5Examples:
6 be used to allow/disallow functionality to a certain region like6
7 [shipping options](shipping_options) or define [tax rates](tax/tax_rates).7Scandinavia
88
9Examples:9 * All zones in Denmark
1010 * All zones in Sweden
11Scandinavia11 * All zones in Norway
1212 * All zones in Finland
13 * All zones in Denmark13
14 * All zones in Sweden14Nordic
15 * All zones in Norway15
16 * All zones in Finland16 * All zones in Denmark
1717 * All zones in Sweden
18Nordic18 * All zones in Norway
1919 * All zones in Finland
20 * All zones in Denmark20 * All zones in Faroe Islands
21 * All zones in Sweden21 * All zones in Greenland
22 * All zones in Norway22 * All zones in Iceland
23 * All zones in Finland23 * All zones in Åland Islands
24 * All zones in Faroe Islands24
25 * All zones in Greenland25## Entity Object
26 * All zones in Iceland26
27 * All zones in Åland Islands27```php
28$geo_zone = new ent_geo_zone();
29$geo_zone->data['name'] = 'Canada and USA';
30$geo_zone->data['zones'] = [
31 [
32 'country_code' => 'CA',
33 'zone_code => '',
34 'city' => '',
35 ],
36 [
37 'country_code' => 'US',
38 'zone_code => '',
39 'city' => '',
40 ],
41];
42$geo_zone->save();
43```

Edytowane przez tim w 28 gru 2023 o 07:00

View code on GitHub