Magento-webshopのお客様がすべての製品を自動的にインポートできるように、Magentoモジュールを作成しようとしています。私はまだMagentoの開発にあまり熟練していないので、途中でいくつかの停止に遭遇します... :-)
今、私は、インデックスページにインポートプロセスを開始するためのテキストとボタンを表示するだけのAdminControllerを作成しようとしています。私が問題を抱えているのは「addButton」の部分です。
public function indexAction() {
$this->loadLayout();
$block = $this->getLayout()
->createBlock('core/text', 'example-block')
->setText("
<h1>Import/update products</h1>
<p>On this page you can start the import of all products from 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により、「未定義のメソッドの呼び出し」エラーが発生します。
これを行う正しい方法は何ですか?
/カルステン