redirect - Magento redirected to other URL after order editting -
currently i'm experiencing problem after editing orders in magento admin. page redirected url, base of belongs store view order belongs to. , page requires re-login admin.
for example, have 2 base urls, each belongs 1 store view:
www.example.old.com //old store view (default) www.example.new.com //new store view the system uses www.example.old.com default base url. under www.example.old.com create order new store , invoice it. on submitting invoice, page redirected from
http://www.example.old.com/index.php/admin/sales_order_invoice/new/order_id/1234/ to
http://www.example.new.com/admin/sales_order/view/order_id/1234/ and requires login time.
i traced redirection code 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()); then don't know do. there no parameter _store seems magento determines store view run based on order being treated, when supposed stay on same base url throughout admin.
for may still show interests old entry, share solution. not one, indeed hard-coded redirection avoid going uncertain url, fixed problem me.
in controller action redirection happens, modify
$this->_redirect(..., array(... => ...)); to
$this->_redirect(..., array(... => ..., '_store' => mage::app()->getstore($storeid))); this ensures redirection goes specified store.
Comments
Post a Comment