• Best Magento

    Marketplace Extension

  • Most Reliable

    & Dedicated Support

  • Most Reasonable

    & Flexible Price

How to define a controller in vendor cpanel.

Put following sample xml code on your config.xml file to define a controller for vendor cpanel.

  1. <frontend>
  2. <routers>
  3. <vendors>
  4. <args>
  5. <modules>
  6. <vendorscredit before="VES_Vendors">VES_VendorsCredit</vendorscredit>
  7. </modules>
  8. </args>
  9. </vendors>
  10. </routers>
  11. </frontend>

You need to change the name of <vendorscredit> tag and the extension name VES_VendorsCredit corresponding with your extension.

The controller class must be extended the class VES_Vendors_Controller_Action

  1. class VES_VendorsCredit_Credit_WithdrawController extends VES_Vendors_Controller_Action {
  2. public function indexAction() {
  3. $this->loadLayout()->_setActiveMenu('credit')
  4. ->_title($this->__('Credit'))
  5. ->_title($this->__('Withdraw'))
  6. ->_addBreadcrumb(Mage::helper('vendorscredit')->__('Credit'), Mage::helper('vendorscredit')->__('Credit'))
  7. ->_addBreadcrumb(Mage::helper('vendorscredit')->__('Withdrawal'), Mage::helper('vendorscredit')->__('Withdrawal'));
  8. $this->renderLayout();
  9. }