こんにちは、phtml からブロックに値を渡す方法は?
以下は私のコードです: store.php
public function __construct($type1)
{
parent::__construct();
$items = Mage::getModel('redemption/store')->getCollection()
->addFieldToFilter('status', array('eq' => 1))
->addFieldToFilter('category', array('eq' => $type1))
->addAttributeToSort('mreward_required', 'asc');
$this ->setCollection($items);
}
index.phtml
$type1 = 'Celcom';
$items = $this->getCollection($type1);
それは動かなかった。