Skip to main content
Zones define geographic regions for your store. Each zone groups countries together and associates them with a currency, carriers, payment methods, and tax rules. When a customer checks out, Shopper resolves their zone from the shipping address and uses it to determine available shipping options, payment methods, and tax rates.

Model

The model used is Shopper\Core\Models\Zone. It uses the HasSlug trait for automatic slug generation. The model is not configurable via config/shopper/models.php.

Database Schema

Pivot Table

The zone_has_relations pivot table connects zones to countries, carriers, payment methods, and collections through a polymorphic relationship.

Relationships

Currency

Each zone is associated with one currency. This determines which currency is used for pricing and checkout in that zone.

Countries

Zones group multiple countries together. When a customer enters a shipping address, Shopper resolves the zone by matching the country.

Carriers

Carriers (shipping providers) are scoped to zones. A carrier available in Europe may not be available in North America.

Payment Methods

Payment methods are scoped to zones. For example, iDEAL is only available in the Netherlands zone.

Shipping Options

Each zone has shipping options (carrier options with rates) available at checkout:

Collections

Collections can be scoped to specific zones for region-specific merchandising:

Query Scopes

The enabled scope filters zones that are active:

Computed Attributes

The Zone model provides computed attributes that return comma-separated names for related entities:

HasZones Trait

Models that can be scoped to zones use the HasZones trait. This is already applied to PaymentMethod, Carrier, and Collection models.

Creating Zones

To create a zone for the European market:

Retrieving Zones

To find the zone for a customer’s shipping address:
To get all enabled zones with their currencies:

Components

The zone management components are part of the settings configuration. To customize:
Zone-related components in config/shopper/components/setting.php: