移动购物车和比较块到顶部链接-动态/惰性块的问题
-
12-12-2019 - |
题
我试图移动购物车和比较块到顶部链接,当用户通过 li
出现购物车/产品比较:成功了。
微型车
<reference name="header">
<reference name="top.links">
<remove name="checkout_cart_link"/>
<block type="minicart/view" name="minicart_toplink" template="minicart/toplink.phtml" >
<block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"/>
</block>
<action method="addLinkBlock"><blockName>minicart_toplink</blockName></action>
<block type="checkout/links" name="checkout_cart_link_minicart">
<action method="addCheckoutLink"></action>
</block>
</reference>
</reference>
小型公司
<!-- Disable compare product block on left and right sidebar -->
<reference name="right">
<action method="unsetChild">
<name>catalog.compare.sidebar</name>
</action>
</reference>
<reference name="left">
<action method="unsetChild">
<name>catalog.compare.sidebar</name>
</action>
</reference>
<!-- Add Compare product block to top links -->
<reference name="header">
<reference name="top.links">
<block type="minicompare/view" name="minicompare_toplink" template="minicompare/toplink.phtml" >
<block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" as="topcompare" template="catalog/product/compare/sidebar.phtml"/>
</block>
<action method="addLinkBlock"><blockName>minicompare_toplink</blockName></action>
</reference>
</reference>
问题是,当我使用 Lesti:FPC
或 Varnish
这些块会产生问题:使用清漆,它们被复制(用于购物车,结账和产品cmopare的双链路)和Lesti(如果添加到 lazy blocks
)当我第一次访问(任何和每个)页面时,它们不会出现,如果我重新启动它们会出现,但如果我更改页面,块重置(没有项目,总计=0,但项目在购物车中),我必须刷新。
知道吗?
解决方案
莱斯蒂FPC:这解决了我的问题(我已经从动态部分删除了对这些块的任何引用)
懒惰块
catalog.compare.sidebar,
minicart_head