嗨,如何将值从 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);
}
索引.phtml
$type1 = 'Celcom';
$items = $this->getCollection($type1);
那没起效。