diff --git a/app/code/local/Mage/CatalogSearch/Block/Autocomplete.php b/app/code/local/Mage/CatalogSearch/Block/Autocomplete.php
index 77b0b92..ac2e2ed 100644
--- a/app/code/local/Mage/CatalogSearch/Block/Autocomplete.php
+++ b/app/code/local/Mage/CatalogSearch/Block/Autocomplete.php
@@ -34,7 +34,7 @@ class Mage_CatalogSearch_Block_Autocomplete extends Mage_Core_Block_Abstract
protected function _toHtml()
{
$html = '';
-
+ $current_store_symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
if (!$this->_beforeToHtml()) {
return $html;
}
@@ -57,7 +57,7 @@ protected function _toHtml()
}
$html .= '
'
- . '
'.$this->escapeHtml($item['title']).'';
+ . ''.$this->escapeHtml($item['title']). "
". "Price: " . number_format((float)$item['price'], 2, '.', '') . "" . $current_store_symbol .'
';
}
$html.= '';
@@ -73,7 +73,8 @@ public function getSuggestData()
->addAttributeToFilter('name', array(
'like' => '%'.$query.'%'
))
- ->setPageSize(5)
+ ->addAttributeToSelect('price')
+ ->setPageSize(8)
->addAttributeToSelect('small_image')
->addAttributeToSelect('url_path')
->addAttributeToFilter('visibility', 4);
@@ -83,8 +84,9 @@ public function getSuggestData()
foreach ($collection as $item) {
$_data = array(
'title' => $item->getName(),
+ 'price' => $item->getPrice(),
'row_class' => (++$counter)%2?'odd':'even',
- 'image_url' => (string)Mage::helper('catalog/image')->init($item, 'small_image')->resize(50),
+ 'image_url' => (string)Mage::helper('catalog/image')->init($item, 'small_image')->resize(70),
'url_path' => $item->getUrlPath()
);