服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > php教程 > magento教程 >

magento开启solr产品列表属性筛选无效

时间:2015-07-10 00:54来源:未知 作者:最模板 点击:
magento 开启solr 产品列表属性筛选无效 ,solr layered navigation 不起作用。比如价格属性筛选等 一:debug了一段时间,发现solr返回的$this-_searchedEntityIds = $ids; 被执行两次,也就double sql, 结果
magento 开启solr 产品列表属性筛选无效 ,solr layered navigation 不起作用。比如价格属性筛选等 
 
一:debug了一段时间,发现solr返回的$this->_searchedEntityIds = &$ids;  被执行两次,也就double sql,
 
结果是GA造成个collection 复用,产品list页面调用getLoadedProductCollection
 
$_productCollection = Mage::getBlockSingleton(“catalog/product_list”)->getLoadedProductCollection();
$_productCollection_clone = clone $_productCollection;
 
 
 
二:double sql问题解决还是筛选无效,发现是layout layered里面为调用serch 类型的模板
 
<block type=”enterprise_search/catalog_layer_view” name=”product.attribute.layer” before=”-” template=”catalog/layer/view.phtml”/>
 
 
<catalog_category_default translate="label">
<label>Catalog Category (Non-Anchor)</label>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>responsive/css/productlist.css</name></action>
<action method="addItem"><type>skin_css</type><name>css/jquery.jscrollpane.css</name></action>
<action method="addItem"><type>skin_js</type><name>js/jquery.jscrollpane.min.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/jquery.mousewheel.js</name></action>
</reference>
<reference name="left_first">
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml">
<block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
</block>
</reference>
<reference name="content">
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<block type="decathlon/catalog_product_list_notify" name="notify.list.box" template="catalog/product/notify_list_box.phtml"/>
 
<block type="enterprise_search/catalog_layer_view" name="product.attribute.layer" before="-" template="catalog/layer/view.phtml"/>
<block type="core/text_list" name="product_list.name.after" as="name.after" />
<block type="core/text_list" name="product_list.after" as="after" />
 
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
 
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
<!-- Since the addColumnCountLayoutDepend does not work, we are manually setting the max columns -->
<action method="setColumnCount"><count>4</count></action>
</block>
</block>
</reference>
 
(责任编辑:最模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------