目前,我在 Magento 管理员中编辑订单后遇到问题。该页面总是被重定向到另一个 URL,其基础属于订单所属的商店视图。此页面需要重新登录管理员。
例如,我有两个基本 URL,每个都属于一个商店视图:
www.example.old.com //old store view (default)
www.example.new.com //new store view
系统使用www.example.old.com默认的基本 URL。因此,在www.example.old.com我为新商店创建订单并为其开票时。然后在提交发票时,页面从
http://www.example.old.com/index.php/admin/sales_order_invoice/new/order_id/1234/
至
http://www.example.new.com/admin/sales_order/view/order_id/1234/
它需要再次登录。
我将重定向代码跟踪到Mage_Core_Model_Url
public function getRouteUrl($routePath=null, $routeParams=null)
    ...
    $url = $this->getBaseUrl().$this->getRoutePath($routeParams);
public function getBaseUrl($params = array())
    ....
    if (isset($params['_store'])) {
        $this->setStore($params['_store']);
    }
    ....
    return $this->getStore()->getBaseUrl($this->getType(), $this->getSecure());
然后我不知道该怎么办。没有参数_store,但似乎 Magento 根据正在处理的订单确定要运行的商店视图,当它应该在整个管理员中保持相同的基本 URL 时。