protected function _optionToHtml($option, $selected) { $html = '<div class="amorderattr_img_checkbox" style="float: left; clear: none; padding-right: 4px;">'; if (Mage::helper('amcustomerattr')->getAttributeImageUrl($option['value'])) { $html .= '<img src="' . Mage::helper('amcustomerattr')->getAttributeImageUrl($option['value']) . '" style="clear: right;" />'; } $cssClass = ''; if (false !== strpos($this->getData('class'), 'required-entry') && !$this->getCheckboxValidationUsed()) { $this->setCheckboxValidationUsed(true); $cssClass = 'validate-checkboxgroup-required'; } $html .= '<div><input type="checkbox" class="' . $cssClass . '" name="' . parent::getName() . '[]" id="' . $this->getData('html_id') . '___' . $this->_escape($option['value']) . '" value="' . $this->_escape($option['value']) . '"'; if (in_array((string) $option['value'], $selected)) { $html .= ' checked="checked"'; } $html .= ' /> '; $html .= $this->_escape($option['label']); $html .= '</div></div>'; return $html; /* $html = '<option value="'.$this->_escape($option['value']).'"'; $html.= isset($option['title']) ? 'title="'.$this->_escape($option['title']).'"' : ''; $html.= isset($option['style']) ? 'style="'.$option['style'].'"' : ''; if (in_array((string)$option['value'], $selected)) { $html.= ' selected="selected"'; } $html.= '>'.$this->_escape($option['label']). '</option>'."\n"; return $html;*/ }