getSuggestData();
$html = '';
$count=count($suggestData);
$count--;
$index =0;
$html = '
';
foreach ($suggestData as $key => $item) {
$class='';
if ($index == 0) {
$class= ' first';
}
if ($index == $count) {
$class = ' last';
}
$index++;
$html .= '- '
. ''.$item['num_of_results'].''.$this->escapeHtml($item['attribute_code']).'
';
}
$html.= '
';
return $html;
}
public function getSuggestData()
{
if($attributecode=$this->getRequest()->getParam('arw_attributecode')){
$_product = Mage::getModel('catalog/product');
$_attributes = Mage::getResourceModel('eav/entity_attribute_collection')
->addFieldToFilter('attribute_code',array('like'=>'%'.$attributecode.'%'))
->setEntityTypeFilter($_product->getResource()->getTypeId());
return $_attributes;
}
return '';
}
}