Magento admin: Making simple admin import interface with start-button -


i trying make magento module, enable our magento-webshop customers import our products automatically. since i'm not yet proficient in magento development, run few stops on way... :-)

right try make admincontroller in index page should display text , a button start import process. it's "addbutton" part, have trouble with:

public function indexaction() { $this->loadlayout(); $block = $this->getlayout() ->createblock('core/text', 'example-block') ->settext(" <h1>import/update products</h1> <p>on page can start import of products misstoro.</p> ...bla bla bla... "); $this->_addcontent($block); $url = $this->geturl('*/*/do_import'); $this->_addbutton('button_import', array( 'label' => mage::helper('import')->__('start import'), 'onclick' => 'setlocation(\'' . $url .'\')', 'class' => 'add', )); $this->renderlayout(); } 

$this->_addbutton gives me "call undefined method" error.

what right way this?

/ carsten

figured out little more research:

$url = $this->geturl('*/*/do_import'); $block = $this->getlayout() ->createblock('adminhtml/widget_button') ->setdata(array( 'label' => mage::helper('import')->__('start import'), 'onclick' => 'setlocation(\'' . $url .'\')', 'class' => 'add', )); $this->_addcontent($block); 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -