Linking to Magento Admin from Outside Admin Panel

十年热恋 提交于 2019-12-05 11:39:39

Disabling secret key from admin URLs should solve your problem.

To disable secret key from admin URLs:-

  • Login to admin
  • Go to System -> Configuration -> ADVANCED -> Admin -> Security -> Add Secret Key to URLs
  • Select No
  • Save Config

I came up with the following that turns off the secret key based on the action name:

public function preDispatch()
{ 
     if ($this->getRequest()->getActionName() == 'update') Mage::getSingleton('adminhtml/url')->turnOffSecretKey();
     parent::preDispatch();
}

Tested in ver 1.6.2.0. Paste that in your controller, don't forget to change the action name 'update' to yours or remove the if statement to effect for all actions within your controller.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!