PHPackages                             opengento/module-country-store - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. opengento/module-country-store

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

opengento/module-country-store
==============================

This module add the many countries to many stores relation and make it available to the storefront.

2.0.1(1y ago)67.6k↓32.7%1[1 issues](https://github.com/opengento/magento2-country-store/issues)3MITPHPPHP ^8.1

Since Aug 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/opengento/magento2-country-store)[ Packagist](https://packagist.org/packages/opengento/module-country-store)[ Docs](https://github.com/opengento/magento2-country-store)[ RSS](/packages/opengento-module-country-store/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (9)Versions (9)Used By (3)

Country Store Module for Magento 2
==================================

[](#country-store-module-for-magento-2)

[![Latest Stable Version](https://camo.githubusercontent.com/06e0793932f411733d31ef1d4ac4545fd33b3432b8da3ecac3c225c8379ebfe8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e67656e746f2f6d6f64756c652d636f756e7472792d73746f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/opengento/module-country-store)[![License: MIT](https://camo.githubusercontent.com/1293eddf54cf3584dec13268e6338a367021e83109ed6cd2b28f42456df1f1ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f70656e67656e746f2f6d6167656e746f322d636f756e7472792d73746f72652e7376673f7374796c653d666c61742d737175617265)](./LICENSE)[![Packagist](https://camo.githubusercontent.com/cfb85264c8aa341db7074c4a95ea9cd697fab69ada9caf7ba305189d7f208393/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f70656e67656e746f2f6d6f64756c652d636f756e7472792d73746f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/opengento/module-country-store/stats)[![Packagist](https://camo.githubusercontent.com/c4a3606a6eaf6a624ed5b9c8cec7e65304f9ddac1325680c092f3f72bc4eb27c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6f70656e67656e746f2f6d6f64756c652d636f756e7472792d73746f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/opengento/module-country-store/stats)

This module add the many countries to many stores relation and make it available to the storefront.

- [Setup](#setup)
    - [Composer installation](#composer-installation)
    - [Setup the module](#setup-the-module)
- [Features](#features)
- [Settings](#settings)
- [Documentation](#documentation)
- [Support](#support)
- [Authors](#authors)
- [License](#license)

Setup
-----

[](#setup)

Magento 2 Open Source or Commerce edition is required.

### Composer installation

[](#composer-installation)

Run the following composer command:

```
composer require opengento/module-country-store

```

### Setup the module

[](#setup-the-module)

Run the following magento command:

```
bin/magento setup:upgrade

```

**If you are in production mode, do not forget to recompile and redeploy the static resources.**

Features
--------

[](#features)

### Country to store mapping

[](#country-to-store-mapping)

Define many countries to many stores relation. This configuration will allows Magento to map stores with countries.

Settings
--------

[](#settings)

The configuration for this module is available in `Stores > Configuration > General > Country Store`.

Documentation
-------------

[](#documentation)

### How to add a country resolver

[](#how-to-add-a-country-resolver)

Create a new final class and implements the following interface: `Opengento\CountryStore\Api\CountryResolverInterface`. The method `public function getCountry(): CountryInterface` should return the default country depending of the context. The country code should be compliant to ISO 3166-1 alpha-2 format.

Register the new country resolver in the method factory, `Vendor/Module/etc/di.xml`:

```

            Vendor\Module\Model\Country\Resolver\CustomCountryResolver

```

If you want the resolver to be available in settings, add it to the resolver list, `Vendor/Module/etc/di.xml`:

```

                Custom Country Resolver
                Vendor\Module\Model\Country\Resolver\CustomCountryResolver::RESOLVER_CODE

```

The country resolver is ready to use.

Support
-------

[](#support)

Raise a new [request](https://github.com/opengento/magento2-country-store/issues) to the issue tracker.

Authors
-------

[](#authors)

- **Opengento Community** - *Lead* - [![Twitter Follow](https://camo.githubusercontent.com/f582f22fdefea808310d5426ff86d748569ab584a65c28c30eb34b72a73ba802/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6f70656e67656e746f2e7376673f7374796c653d736f6369616c)](https://twitter.com/opengento)
- **Thomas Klein** - *Maintainer* - [![GitHub followers](https://camo.githubusercontent.com/e0e283f9de9d23a7bfeac3e6088a3a3a6844c123e1861f866242cd80e3361088/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f6c6c6f776572732f74686f6d61732d6b6c312e7376673f7374796c653d736f6369616c)](https://github.com/thomas-kl1)
- **Contributors** - *Contributor* - [![GitHub contributors](https://camo.githubusercontent.com/1a9abf1133ba8f62e9ce54e5a8fb726ab5abff13d8369590c484fa735c84fbee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6f70656e67656e746f2f6d6167656e746f322d636f756e7472792d73746f72652e7376673f7374796c653d666c61742d737175617265)](https://github.com/opengento/magento2-country-store/graphs/contributors)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) details.

***That's all folks!***

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~206 days

Recently: every ~323 days

Total

8

Last Release

711d ago

Major Versions

1.1.0 → 2.0.02024-03-26

PHP version history (3 changes)1.0.0PHP ^7.4

1.1.0PHP ^7.4||^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95669?v=4)[Thom](/maintainers/thomasklein)[@thomasklein](https://github.com/thomasklein)

---

Top Contributors

[![thomas-kl1](https://avatars.githubusercontent.com/u/20971693?v=4)](https://github.com/thomas-kl1 "thomas-kl1 (18 commits)")

---

Tags

countrymagentomagento-2magento-extensionmagento-modulemagento2magento2-extensionmagento2-extension-freemagento2-modulemapperrelationshipstorephpmagentowebsitestorecountrymagento2

### Embed Badge

![Health badge](/badges/opengento-module-country-store/health.svg)

```
[![Health](https://phpackages.com/badges/opengento-module-country-store/health.svg)](https://phpackages.com/packages/opengento-module-country-store)
```

###  Alternatives

[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50398.5k20](/packages/dotdigital-dotdigital-magento2-extension)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

244.9k2](/packages/zwernemann-module-withdrawal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
