opengento / module-store-path-url
This module updates the store code path in url with the country code or a custom value.
Installs: 107
Dependents: 0
Suggesters: 1
Security: 0
Stars: 6
Watchers: 6
Forks: 0
Open Issues: 1
Type:magento2-module
Requires
- php: ^8.1
- magento/framework: *
- magento/module-config: *
- magento/module-directory: *
- magento/module-store: *
- magento/module-url-rewrite: *
- psr/log: *
Requires (Dev)
- magento/magento-coding-standard: ^33
- roave/security-advisories: dev-latest
Suggests
- opengento/module-store-path-url: This module updates the store code path in url with the country code or a custom value.
README
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
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.
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: "Custom Store Path Url" and "Custom Path Mapper" fi the "custom" value is selected.
The store path config are:
web/url/use_store_path
web/url/custom_path_mapper
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!