I recently read the PHP Architect’s Guide to Programming with Magento book and created a couple of custom modules with relative ease, but I’m stuck on this so if anyone out there can help that would be great.
As in the Manage Stores area of the admin, my setup looks like this.
I’ve written a simple custom module to allow the administrator to manage some rate figures that apply to their service/business. They need to have different rate figures for both the consumer and business stores, so when entering a new rate I’d like to have a 2 row high multiple select list that allows them to specify which store/s the rate is for.
In my Project_Rate_Block_Adminhtml_Rate_Edit_Tab_General class I’m trying to do something like this…
$fieldset->addField('store_ids', 'select', array(
'label' => Mage::helper('rate')->__('Select Stores'),
'name' => 'store_ids',
'values' => Mage::getModel('core/store')->getCollection()->toOptionHash()
So far all I get is a standard drop down list with the labels:
<select id="store_ids" name="store_ids" type="select" class="select">
Any idea how I can do this?