Magento: Getting the admin panel urls

A page in Magento’s admin panel works similiar as customer facing pages, there is a admin controller for each of the pages in the admin panel. The controller resides in the controllers/Adminhtml/ folder in the module directory. For example, the url “index.php/admin/customer/edit/id/7”, admin is referencing the modlue name, customer is referencing the controller class, edit is referencing the edit action of the controller and id is the parameter for the edit action.

The url for customer page in the admin panel. index.php/admin/customer/edit/id/7

echo Mage::helper('adminhtml')->getUrl('adminhtml/customer/edit/index/id',array('id'=>7));

The url for catalog product page in the admin panel. index.php/admin/catalog_product/edit/id/166

echo Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/edit/index/id',array('id'=>166));

The url for sales order in the admin panel. index.php/admin/sales_order/view/order_id/8

echo Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view/order_id/',array('order_id'=>8));

The url for sales report page in the admin panel. index.php/admin/report_sales/sales

echo Mage::helper('adminhtml')->getUrl('adminhtml/report_sales/sales/');

The url for sales report page with some dummpy parameters in the admin panel. index.php/admin/report_sales/sales/id/123/date/20140818

echo Mage::helper('adminhtml')->getUrl('adminhtml/report_sales/sales/id/date',array('id'=>123,'date'=>20140818));

Search within Codexpedia

Custom Search

Search the entire web

Custom Search