aurmil / magento-force-store-code
Magento - 强制门店代码扩展
v1.4.0
2017-09-06 13:21 UTC
Requires
This package is auto-updated.
Last update: 2024-09-12 04:18:59 UTC
README
概述
在 Magento 后台激活“向 URL 添加门店代码”功能,即使没有门店代码,主 URL 也可以使用。
此扩展仅检查主页的 URL 中是否包含门店代码。如果没有,它将重定向(301)到“基本 URL + 当前网站的默认门店视图代码”。
此扩展仅管理主页,不管理内部页面,因为对于它们,Magento 会自动在 URL 中添加门店代码。
兼容性
已在 Magento CE 1.6 - 1.9 上测试
注意
- 免费开源
- 完全可配置
- 附带英文和法语翻译
安装
不会修改任何 Magento 文件,没有扩展类,没有覆盖方法。
使用 modman
$ modman clone https://github.com/aurmil/magento-force-store-code.git
手动
- 在此处下载此模块的最新版本:这里
- 解压它
- 将 "app" 文件夹移动到您的 Magento 应用程序根目录中,它将与现有的 "app" 文件夹合并
使用 composer
- 将以下 "composer.json" 文件适配到您的文件中
{
"require": {
"aurmil/magento-force-store-code": "dev-master"
},
"repositories": [
{
"type": "composer",
"url": "http://packages.firegento.com"
},
{
"type": "vcs",
"url": "git://github.com/aurmil/magento-force-store-code"
}
],
"extra": {
"magento-root-dir": "./"
}
}
- 安装或更新您的 composer 项目的依赖项
用法
在 系统 > 配置 > 一般 > 网络 > URL 选项 中,此扩展添加了一个新的选项:在 URL 中强制使用门店代码
- 选择 "否" 以保持 Magento 基本行为
- 选择 "是"(默认值)以激活扩展
注意:如果之前已激活扩展,浏览器可能会缓存 HTTP 重定向,因此如果重定向仍然发生,请在选择 "否" 后清理缓存。
许可证
MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件。