Questions tagged «advanced-search»

3
Magento 1.9.2添加图层导航以进行高级搜索
我已经按照以下3个步骤进行了高级搜索层导航,但是它不起作用。任何想法/建议或如何在高级搜索中实现图层导航? 1)在我们的local.xml下的catalogsearch_advanced_result标记下添加。 <reference name="left"> <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/> </reference> 2)使用覆盖重写catalogsearch / model / Layer.php的prepareProductCollection函数 public function prepareProductCollection($collection){ if(Mage::helper('catalogsearch')->getQuery()->getQueryText())//for normal search we get the value from query string q=searchtext return parent::prepareProductCollection($collection); else{ $collection->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()); /** * make sure you cross check the $_REQUEST with $attributes */ $attributes = Mage::getSingleton('catalog/product')->getAttributes(); Mage::log(print_r($_REQUEST,1)); foreach($attributes …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.