opengento / module-store-path-url
opengento/module-store-path-url
This module updates the store code path in url with the country code or a custom value.
Store Path Url Module for Magento 2
This module allows to override the store code in url with another path value.
Setup
Magento 2 Open Source or Commerce edition is required.
Composer installation
Run the following composer command:
composer require opengento/module-store-path-url
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
The module allows to replace the store code in url with the following options:
- Country Code, e.g: be
- Language Code, e.g: fr
- Locale Code (separated with a hyphen), e.g: fr-be
- Locale Code (separated with an underscore), e.g: fr_be
- Custom (you can setup the path of your choice), e.g: emea
This module also allows you to remove the store path in the url for websites with a single store view. This may be useful for stores with dedicated domains. This setting is automatically enabled if you choose to use the custom mapper. However, if a single store exists for a website, and a path is setup within the mapper, the path is not unset, meaning that the path configured in the mapper is used.
Besides that, this module makes the usage of the MAGE_RUN_TYPE and MAGE_RUN_CODE variables optionals. Magento is going to be able to resolve the correct store based on its base web URL. This setting can be disabled, see "Use Base Url Resolver".
Settings
The configuration for this module is available in Stores > Configuration > Web > Url.
Documentation
In order to use this module, you must enable the following setting: "Add Store Code to Urls" (web/url/use_store).
A new field is added in the configuration: "Store Path Url" and "Custom Path Mapper" if the "custom" value is selected.
The store path config are:
web/url/store_path_urlweb/url/custom_path_mapperunset_single_store_pathbase_url_resolver
Support
Raise a new request to the issue tracker.
Authors
License
This project is licensed under the MIT License - see the LICENSE details.
That's all folks!
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 4.1.9 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2025-09-26 23:55:36 |
| 4.1.8 | stable | Not tested | Not yet tested Details | 2025-09-09 17:52:33 |
| 4.1.7 | stable | Not tested | Not yet tested Details | 2025-04-11 20:37:28 |
| 4.1.6 | stable | Not tested | Not yet tested Details | 2025-03-20 16:23:27 |
| 4.1.5 | stable | Not tested | Not yet tested Details | 2025-02-10 15:03:36 |
| 4.1.4 | stable | Not tested | Not yet tested Details | 2024-09-20 10:14:10 |
| 4.1.3 | stable | Not tested | Not yet tested Details | 2024-05-23 17:13:07 |
| 4.1.2 | stable | Not tested | Not yet tested Details | 2024-05-23 16:59:11 |
| 4.1.1 | stable | Not tested | Not yet tested Details | 2024-05-13 19:19:54 |
| 4.1.0 | stable | Not tested | Not yet tested Details | 2024-05-07 20:02:16 |
| 4.0.5 | stable | Not tested | Not yet tested Details | 2024-05-07 12:29:54 |
| 4.0.4 | stable | Not tested | Not yet tested Details | 2024-04-12 13:48:38 |
| 4.0.3 | stable | Not tested | Not yet tested Details | 2024-04-08 09:00:07 |
| 4.0.2 | stable | Not tested | Not yet tested Details | 2024-04-02 16:35:02 |
| 4.0.1 | stable | Not tested | Not yet tested Details | 2024-04-02 15:57:54 |
| 4.0.0 | stable | Not tested | Not yet tested Details | 2024-03-29 22:36:39 |
| 3.0.2 | stable | Not tested | Not yet tested Details | 2024-03-27 22:33:39 |
| 3.0.1 | stable | Not tested | Not yet tested Details | 2024-03-27 17:15:23 |
| 3.0.0 | stable | Not tested | Not yet tested Details | 2024-03-22 23:19:06 |
| 2.0.4 | stable | Not tested | Not yet tested Details | 2024-03-21 22:33:40 |
| 2.0.3 | stable | Not tested | Not yet tested Details | 2024-03-19 18:56:39 |
| 2.0.2 | stable | Not tested | Not yet tested Details | 2024-03-18 22:42:31 |
| 2.0.1 | stable | Not tested | Not yet tested Details | 2024-03-18 22:39:05 |
| 2.0.0 | stable | Not tested | Not yet tested Details | 2024-03-18 20:01:10 |
| 1.0.3 | stable | Not tested | Not yet tested Details | 2024-03-18 15:07:47 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2024-03-18 10:19:01 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2024-03-15 20:56:40 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2024-03-15 20:53:31 |
Requires 7
| Package | Constraint |
|---|---|
| php | ^8.1 |
| psr/log | * |
| magento/framework | * |
| magento/module-config | * |
| magento/module-directory | * |
| magento/module-store | * |
| magento/module-url-rewrite | * |
Requires-dev 2
| Package | Constraint |
|---|---|
| magento/magento-coding-standard | ^33 |
| roave/security-advisories | dev-latest |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from opengento
View vendorThis module allows to toggle server side rendered breadcrumbs for product pages.
This module enables you to log in without a password and without relying on a third-party service.
This extension sets new logger handlers for Magento2, such as Gelf or Slack and many others.
This module allows you to analyze all the webapi rest done call toward your Magento.
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.