I have to use this link for add import button in custom grid.

How to add Upload Button for importing a csv file in the Custom Admin Grid Container?

but I don't know how to add its action?

it is my makemodel.php file


class Sigmasolve_Makemodel_Block_Adminhtml_Makemodel extends Mage_Adminhtml_Block_Widget_Grid_Container
    public function __construct()
        $this->_controller = 'adminhtml_makemodel';
        $this->_blockGroup = 'makemodel';
        $this->_headerText = Mage::helper('makemodel')->__('Item Manager');
        $this->_addButtonLabel = Mage::helper('makemodel')->__('Add Item');

        $this->_addButton("Import", array(
            "label" => Mage::helper("core")->__("Import"),
            "onclick" => "location.href = '" . $this->getUrl('makemodel/adminhtml_import') . "';",
            "class" => "btn btn-danger",

1 Answer 1


Please make "Import" controller and "index" as shown below:-

class YourPackageName_YourModuleName_Adminhtml_ImportController extends Mage_Adminhtml_Controller_action{
   public function indexAction() {
      //your import codes write here
  • can i set the save action in this file for import csv? Jan 25, 2017 at 5:45
  • sure . then your action url should be $this->getUrl('makemodel/adminhtml_import/save') Jan 25, 2017 at 5:48
  • How did yoy saved it any idea
    – Jaisa
    Jul 18, 2018 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.