如何在magento中的管理表格下拉列表中设置默认值?
我正在研究Magento 1.7版本。 我的密码如下:-如何在magento中的管理表格下拉列表中设置默认值?,magento,magento-1.7,adminhtml,Magento,Magento 1.7,Adminhtml,我正在研究Magento 1.7版本。 我的密码如下:- $categoryArray = Mage::getSingleton('lookbook/category')->getOptionArray(); $catId = Mage::getSingleton('core/session')->getCatId(); //it has value 4 $fieldset->addField('category_id', 'select', array
$categoryArray = Mage::getSingleton('lookbook/category')->getOptionArray();
$catId = Mage::getSingleton('core/session')->getCatId(); //it has value 4
$fieldset->addField('category_id', 'select', array(
'label' => Mage::helper('lookbook')->__('Lookbook'),
'name' => 'category_id[]',
'values' => $categoryArray,
'value' => $catId,
'disabled' => true
));
如何在Magento中的管理网格窗体下拉列表中设置所选的此值?将其添加到网格的
\u construct
方法中
$this->_defaultFilter = array('category_id'=>Mage::getSingleton('core/session')->getCatId());
将其添加到网格的
\u构造方法中
$this->_defaultFilter = array('category_id'=>Mage::getSingleton('core/session')->getCatId());
看一看@
看一看@
我想在表单中设置默认值不在筛选器中我想在表单中设置默认值不在筛选器中