2

I'm trying to move the cart & compare blocks to top links and when the user goes over the li the cart/product compare appears: it works.
Minicart

<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>

Minicompare

<!-- 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>

The problem is that when I use Lesti:FPC or Varnish these blocks create problems: with varnish they are duplicated(double link for cart, checkout and product cmopare) and with Lesti (if added under lazy blocks) they don't appear when I visit the (any and every) page for the first time, if I relaod they appear, but if I change the page the block reset (no item, total=0, but the items are in the cart) and I have to refresh.
Any idea?

1 Answer 1

1

Lesti FPC: this solved my problem (I have removed any reference to these blocks from the Dynamic section)

Lazy Block

catalog.compare.sidebar,
minicart_head
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.