customgento / module-default-store-code-remover-m2
Magento 2 默认店铺代码移除器隐藏默认店铺中的URL中的店铺代码。
v1.0.5
2024-06-03 11:26 UTC
Requires
- php: ~7.3.0||~7.4.0||~8.1.0||~8.2.0||~8.3.0
- magento/module-store: ~101.0
README
Magento 2 默认店铺代码移除器隐藏默认店铺中的URL中的店铺代码。该模块仅在启用 web/url/use_store
时生效,旨在用于多店铺设置,其中默认商店不应包含任何店铺代码,而所有其他商店则应包含。
安装
composer require customgento/module-default-store-code-remover-m2
bin/magento module:enable CustomGento_DefaultStoreCodeRemover
bin/magento setup:upgrade
bin/magento cache:flush
bin/magento setup:di:compile
示例
当URL中的店铺代码禁用时,商店的URL看起来像这样:https://website.com/
。
当URL中的店铺代码启用时,商店的URL看起来像这样:https://website.com/store_code/
。
当此扩展已安装并启用,且在“商店”>“配置”>“常规”>“Web”>“添加店铺代码”下启用显示店铺代码时,模块将不会显示默认店铺的店铺代码,但会显示任何其他店铺的代码。
因此,对于默认店铺,URL将是https://website.com/
,而对于所有其他店铺,URL将是:https://website.com/store_code
许可证
版权
© 2021 - 现在 CustomGento GmbH