public function getCondition() { if (is_null($this->getValue())) { return null; } if ($this->getColumn()->getFilterOnName()) { return parent::getCondition(); } else { if ((bool) $this->getValue()) { return array('nin' => array('no_selection', '')); } else { return array(array('null' => 1), array('in' => array('no_selection', ''))); } } }
public function getHtml() { $helper = Mage::helper('M2ePro'); $value = $this->getValue('select'); $optionsHtml = ''; foreach ($this->_getOptions() as $option) { $optionsHtml .= $this->_renderOption($option, $value); } $html = <<<HTML <div class="field-100"> <input type="text" name="{$this->_getHtmlName()}[input]" id="{$this->_getHtmlId()}_input" value="{$this->getEscapedValue('input')}" class="input-text no-changes"/> </div> <div style="padding: 5px 0; text-align: right; font-weight: normal"> <label>{$helper->__('eBay Primary Category Assigned')}</label> : <select style="width: 50px" name="{$this->_getHtmlName()}[select]" id="{$this->_getHtmlId()}_select"> {$optionsHtml} </select> </div> HTML; return parent::getHtml() . $html; }