magento 开启solr 产品列表属性筛选无效
发布:smiling 来源: PHP粉丝网 添加日期:2015-08-21 21:52:07 浏览: 评论:0
magento是国外的一个商城了,很多国内的朋友都会使用它了,它的优点是免费,开源并且安全了,下面我们来看看magento 开启solr 产品列表属性筛选无效例子。
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>
Tags: magento产品列表 magento属性
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)