特定のユーザーの支払いの詳細を表示するカスタム モジュール (調査目的) を作成しようとしています。
ブロックとレイアウトの間で立ち往生し、次のようなエラーが発生します。
致命的なエラー: メンバー関数 append() の呼び出し
<?php
class PITS_Pitsnews_PaymentController extends Mage_Core_Controller_Front_Action {
protected function _getSession() {
return Mage::getSingleton('customer/session');
}
public function indexAction() {
$this->loadLayout();
$this->_initLayoutMessages('customer/session');
$session = $this->_getSession();
if (!$this->_getSession()->isLoggedIn()) {
$this->_redirect('customer/account/login/');
return;
}
$this->getLayout()->getBlock('pitsnews')->append(
$this->getLayout()->createBlock('pitsnews/pitsnews')
);
$this->getLayout()->getBlock('pitsnews/pitsnews')->assign('data', $data);
$this->renderLayout();
}
}