GeoIP Store Routing Module for Magento 2

Store switching module for Magento 2

Our Geo IP store routing and currency switching module, Orbital, is available for all Magento Open Source stacks.

Orbital Overview

Orbital will switch [route] a Magento store, or a Magento store view depending on your visitor’s IP address.

Orbital is using a geoip2 library to handle route processing.

Routing [switching] is useful when you want to target and isolate traffic based on country, language, and or currency.

Note: Orbital can also work with a single store view, and handle currency switching.

For example, you can have a specific store view as default for the UK and price in UK English with the British Pound. You can have another store view for the United States, and have English and the US Dollar. When Orbital inspects the IP origin, it will present the store view assigned. [Our stacks are also Cloudflare aware!]

Installation Notes

You can install Orbital during stack deployment on AWS. If you are using a new version of a G6+ Multi, then it will be available. For older G4 and G5F stacks, you should be able to install from CLI.

Step 1. Update

cd /var/www/magento

sudo composer update Amistacx_Orbital

sudo ./

After module installation, please make sure that the string ~ line 12 in app/bootstrap.php is remarked.

e.g. //stream_wrapper_unregister('phar');

Step 2. Upload the geoip2 library*

From the Magento admin console > Stores > Settings > Configuration > AMISTACX > Orbital. In the GeoIP Configuration section, click to “Browse..” button to upload an archive or make use of the default.

Orbital geoip library upload

Step 3. Enable Module

In General Configuration, enable the module.

Step 4. Routing Configuration

In the “Choose Countries” section, select the countries that you want to relate with a store or a store view. Then click  “Save Config” button . The module will then create a section below for every country automatically. In the newly created assignment section, assign to a store or a store view.

Orbital country assignment to Magento view or store

Creating a group of countries:

You can create groups of countries. In “Set number of country groups” field, please set count for groups. For example, 3, for America, Europe and Africa. Then click on “Save Config“. The module will automatically create a section for every country group. Then select countries, and a store or a store view for each of the country group.

Note: You can combine single country settings with group settings.

Currency Switching

In situations where you have a single view store, Orbital can be used to switch the user’s currency based on source of visit. For example, you can have AED set up for the UAE, and Euro set for Europe, and CAD for Canada, and a default base currency.

Step 1. Enable allow currency in Magento: Stores >> Configuration >> General >> Currency Setup

Enable currency for Magento 2

Step 2. From the Orbital module, set the store view and the currency. You will have to flush the system cache, and make sure to re-run Ramjet. Also, for testing purposes, you need to make sure you clear cookies.

That’s it! A simple but powerful module by aMiSTACX that is designed for speed, and included with all our stacks for Magento.

~ Lead_Robot