强制删除Magento中URL的商店代码?___ store = default [英] Force Removal of Store Code ?___store=default from URL’s in Magento

查看:56
本文介绍了强制删除Magento中URL的商店代码?___ store = default的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在magento中,我使用两种商店视图,一种是阿拉伯语,另一种是英语.当我将商店切换为英语时,此字符串会附加在url(___ store = english)中,以获取英语商店视图.现在,我要删除英语中的?___ store = english以及英语中的?___ store = arabic.

In magento, I am using two store views one is for arabic and another one is english language. When I am switching the store to english this string is appended in url (___store=english) for english store view.like wise for arabic. Now I want to remove the ?___store=english for english and ?___store=arabic for arabic in URL.

推荐答案

如果使用链接窗口小部件,请执行以下过程.

If using the link widget, use the following process.

app/code/core/Mage/Catalog/Block/Widget/Link.php复制到app/code/local/Mage/Catalog/Block/Widget/Link.php

搜索(Magento 1.7.x中的第91行/Magento 1.9.x中的第100行)

Search for (line 91 in Magento 1.7.x / line 100 in Magento 1.9.x)

$ this-> _ href = $ this-> _ href. $ symbol. "___ store =". $ store-> getCode();

$this->_href = $this->_href . $symbol . "___store=" . $store->getCode();

并修改为

$ this-> _ href = $ this-> _ href;

$this->_href = $this->_href;

上传并保存您的更改,现在您将不会(动态地)插入您的窗口小部件链接以附加?___ store = default.

Upload and save your changes and you'll now not have your widget (dynamically) inserted links getting appended with ?___store=default.

信用: 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆