Skip to content

Region Selector Extension

The region selector lets customers choose their UK region, which determines if MUP applies to their order.

What It Does

The region selector: - Lets customers select England, Scotland, Wales, or Northern Ireland - Auto-detects region from postcode (optional) - Updates cart attribute (uk_region) - Triggers cart transform when region changes

Where It Appears

The region selector can appear in multiple places:

Global Selector (App Embed)

Location: Header or configurable location
Type: App embed
Settings: - Auto-inject CSS selector (where to place it) - Injection position (beginning or end) - Label text - Placeholder text

Product Advisory Block

Location: Product pages (optional)
Type: Theme block
Settings: - Auto-inject CSS selector (optional) - Icon - Title - Message

Cart Advisory Block

Location: Cart page (optional)
Type: Theme block
Settings: - Auto-inject CSS selector (optional) - Icon - Title - Message - Levy label - Levy note

Configuration

Global Selector Settings

Configure in Theme CustomizerApp embedsGlobal Region Selector:

  • Auto-inject CSS Selector: Where to inject (e.g., .header__top, #site-header)
  • Injection Position: Beginning or end of element
  • Label Text: "Your Region:" (default)
  • Placeholder Text: "Select Region" (default)

Block Settings

Configure in Theme CustomizerBlocks:

Product Advisory: - Auto-inject selector (optional) - Icon (default: ℹ️) - Title (default: "Scotland Customers") - Message (customizable)

Cart Advisory: - Auto-inject selector (optional) - Icon (default: ⚠️) - Title (default: "Minimum Unit Pricing Applies") - Message (customizable) - Levy label (default: "Provisional Levy:") - Levy note (default: "Final levy calculated at checkout")

Auto-Detection

The region selector can auto-detect region from: - MaxMind GeoIP (if configured) - Browser geolocation (if permitted) - Postcode entry

Scottish postcodes detected: - AB, DD, DG, EH, FK, HS, IV, KA, KW, KY, ML, PA, PH, TD, ZE - G1-G9 (Glasgow, excluding GL, GU, GY)

How It Works

  1. Customer selects region or it's auto-detected
  2. Cart attribute uk_region is updated
  3. Cart transform is triggered
  4. MUP levies are added/removed based on region
  5. Cart updates automatically

Customer Experience

Default state: - Dropdown shows "Select Region" - No MUP applied

Scotland selected: - Region set to "Scotland" - Cart transform runs - Levies added if needed - Cart updates

Region changed: - Cart attribute updates - Cart transform re-runs - Levies added/removed as needed

Troubleshooting

Selector not appearing? - Check theme customizer settings - Verify app embed is enabled - Review CSS selector is correct

Auto-detection not working? - Check MaxMind configuration (if used) - Verify browser geolocation permissions - Review postcode format

Region not saving? - Check browser console for errors - Verify cart update is working - Review cart attribute format

Cart not updating? - Ensure cart transform is active - Check region value is "scotland" (lowercase) - Review cart transform logs

For more help, see Troubleshooting.