具有相同代码的多商店视图

时间:2014-07-08 09:06:20

标签: php .htaccess magento

我正在使用magento的网站。其中有两个商店(基地,精品店)和4个商店视图 base(fr,en)和精品店(bfr,ben)。 现在,当我在网站网址中使用商店网址时。我为每个商店视图获得4个网址

http://example.com/en
http://example.com/fr
http://example.com/boutique/ben
http://example.com/boutique/bfr

我们想要其他商店的网址如下所示:

http://example.com/boutique/en
http://example.com/boutique/fr

但我们已经使用这些代码存储了视图。 请帮忙解决这个问题。

1 个答案:

答案 0 :(得分:1)

您不能对2商店视图使用相同的代码。期。
但你可以尝试一种不同的方法让你的网址像这样 不要使用“将商店代码添加到网址”,而是实际创建所需的文件夹frenboutique/enboutique/fr并复制index.php.htaccess个文件到这些文件夹中的每个文件夹并替换以下内容。

$mageFilename = MAGENTO_ROOT . '/app/Mage.php';

$mageFilename = '../app/Mage.php';

$mageFilename = '../../app/Mage.php';

取决于文件夹的深度。

并替换此

Mage::run($mageRunCode, $mageRunType);

Mage::run('store code here', 'store'); //instead of store code view put en, fr, ben or bfr

您还需要从system->配置调整每个商店视图的基本网址。