Skip to main content

Posts

Showing posts from November 12, 2014

Custom Import function in magento

Open the file  app\code\local\mainModule\moduleName\Block\Adminhtml\moduleName.php Add or replace  public function __construct() { $this->_controller = "adminhtml_myoffer"; $this->_blockGroup = "myoffer"; $this->_headerText = Mage::helper("myoffer")->__("Myoffer Manager"); $this->_addButtonLabel = Mage::helper("myoffer")->__("Add New Item"); $this->_addButton('testbutton', array(             'label'     => Mage::helper('Sales')->__('Import'),             'onclick'   => 'jsfunction(this.id)',             'class'     => 'go'         ), 0, 100, 'header', 'header'); parent::__construct(); } And add a java script on same page <script> function jsfunction(){ window.open("http://localhost/ankur/yourPageName.php",'_blank','width=335,height=330,resizable=1');