{"id":24066159,"url":"https://github.com/opengento/magento2-country-store","last_synced_at":"2025-04-23T21:03:48.686Z","repository":{"id":57032215,"uuid":"283801875","full_name":"opengento/magento2-country-store","owner":"opengento","description":"This module add the many countries to many stores relation and make it available to the storefront.","archived":false,"fork":false,"pushed_at":"2024-08-11T17:21:20.000Z","size":62,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T21:03:18.316Z","etag":null,"topics":["country","magento","magento-2","magento-extension","magento-module","magento2","magento2-extension","magento2-extension-free","magento2-module","mapper","relationship","store"],"latest_commit_sha":null,"homepage":"https://opengento.fr/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opengento.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-30T14:47:39.000Z","updated_at":"2024-08-11T17:21:24.000Z","dependencies_parsed_at":"2024-07-22T23:54:08.274Z","dependency_job_id":null,"html_url":"https://github.com/opengento/magento2-country-store","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":"0.33333333333333337","last_synced_commit":"5266fbe3c1d346723a5bf2b00bf03f0ebe815e95"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengento%2Fmagento2-country-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengento%2Fmagento2-country-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengento%2Fmagento2-country-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengento%2Fmagento2-country-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opengento","download_url":"https://codeload.github.com/opengento/magento2-country-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514781,"owners_count":21443208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["country","magento","magento-2","magento-extension","magento-module","magento2","magento2-extension","magento2-extension-free","magento2-module","mapper","relationship","store"],"created_at":"2025-01-09T11:20:00.280Z","updated_at":"2025-04-23T21:03:48.665Z","avatar_url":"https://github.com/opengento.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Country Store Module for Magento 2\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/opengento/module-country-store.svg?style=flat-square)](https://packagist.org/packages/opengento/module-country-store)\n[![License: MIT](https://img.shields.io/github/license/opengento/magento2-country-store.svg?style=flat-square)](./LICENSE) \n[![Packagist](https://img.shields.io/packagist/dt/opengento/module-country-store.svg?style=flat-square)](https://packagist.org/packages/opengento/module-country-store/stats)\n[![Packagist](https://img.shields.io/packagist/dm/opengento/module-country-store.svg?style=flat-square)](https://packagist.org/packages/opengento/module-country-store/stats)\n\nThis module add the many countries to many stores relation and make it available to the storefront.\n\n - [Setup](#setup)\n   - [Composer installation](#composer-installation)\n   - [Setup the module](#setup-the-module)\n - [Features](#features)\n - [Settings](#settings)\n - [Documentation](#documentation)\n - [Support](#support)\n - [Authors](#authors)\n - [License](#license)\n\n## Setup\n\nMagento 2 Open Source or Commerce edition is required.\n\n### Composer installation\n\nRun the following composer command:\n\n```\ncomposer require opengento/module-country-store\n```\n\n### Setup the module\n\nRun the following magento command:\n\n```\nbin/magento setup:upgrade\n```\n\n**If you are in production mode, do not forget to recompile and redeploy the static resources.**\n\n## Features\n\n### Country to store mapping\n\nDefine many countries to many stores relation. This configuration will allows Magento to map stores with countries.\n\n## Settings\n\nThe configuration for this module is available in `Stores \u003e Configuration \u003e General \u003e Country Store`.  \n\n## Documentation\n\n### How to add a country resolver\n\nCreate a new final class and implements the following interface: `Opengento\\CountryStore\\Api\\CountryResolverInterface`.\nThe method `public function getCountry(): CountryInterface` should return the default country depending of the context.\nThe country code should be compliant to ISO 3166-1 alpha-2 format.\n\nRegister the new country resolver in the method factory, `Vendor/Module/etc/di.xml`:\n\n```xml\n\u003ctype name=\"Opengento\\CountryStore\\Model\\Resolver\\ResolverFactory\"\u003e\n    \u003carguments\u003e\n        \u003cargument name=\"countryResolvers\" xsi:type=\"array\"\u003e\n            \u003citem name=\"customCountryResolver\" xsi:type=\"string\"\u003eVendor\\Module\\Model\\Country\\Resolver\\CustomCountryResolver\u003c/item\u003e\n        \u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/type\u003e\n```\n\nIf you want the resolver to be available in settings, add it to the resolver list, `Vendor/Module/etc/di.xml`:\n\n```xml\n\u003cvirtualType name=\"Opengento\\CountryStore\\Model\\Config\\Source\\CountryResolver\"\u003e\n    \u003carguments\u003e\n        \u003cargument name=\"options\" xsi:type=\"array\"\u003e\n            \u003citem name=\"customCountryResolver\" xsi:type=\"array\"\u003e\n                \u003citem name=\"label\" xsi:type=\"string\" translatable=\"true\"\u003eCustom Country Resolver\u003c/item\u003e\n                \u003citem name=\"value\" xsi:type=\"const\"\u003eVendor\\Module\\Model\\Country\\Resolver\\CustomCountryResolver::RESOLVER_CODE\u003c/item\u003e\n            \u003c/item\u003e\n        \u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/virtualType\u003e\n```\n\nThe country resolver is ready to use.\n\n## Support\n\nRaise a new [request](https://github.com/opengento/magento2-country-store/issues) to the issue tracker.\n\n## Authors\n\n- **Opengento Community** - *Lead* - [![Twitter Follow](https://img.shields.io/twitter/follow/opengento.svg?style=social)](https://twitter.com/opengento)\n- **Thomas Klein** - *Maintainer* - [![GitHub followers](https://img.shields.io/github/followers/thomas-kl1.svg?style=social)](https://github.com/thomas-kl1)\n- **Contributors** - *Contributor* - [![GitHub contributors](https://img.shields.io/github/contributors/opengento/magento2-country-store.svg?style=flat-square)](https://github.com/opengento/magento2-country-store/graphs/contributors)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) details.\n\n***That's all folks!***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengento%2Fmagento2-country-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengento%2Fmagento2-country-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengento%2Fmagento2-country-store/lists"}