integer-net / Solr

Solr Module for Magento 1.
http://de.integernet-solr.com/
6 stars 0 forks source link

better check on search autocomplete #14

Closed marcatos closed 8 years ago

marcatos commented 8 years ago

We had an issue selecting as "Method to retrieve autosuggest information" with both options "Magento Controller" and "Magento with separate PHP file" since the condition in Helper is not enough to determine if Mage::registry('current_category') is set.

avstudnitz commented 8 years ago

Thanks, merged it into the "develop" branch. In the new "refactor" branch, we implemented it vice versa:

/**
 * @return bool
 */
public function isCategoryPage()
{
    return Mage::app()->getRequest()->getModuleName() == 'catalog'
        && Mage::app()->getRequest()->getControllerName() == 'category';
}