I'm trying to add a mini cart in a custom layout, but for some reason this cart's behavior is very strange. Sometimes it's gone, sometimes it still display's products after clearing all cache and sometimes it displaying in other layouts.
So it's never in sync with the other carts.
In made a custom block in template/page/html/storeMenu.phtml with this code:
<?php echo $this->getChildHtml('cart_homepage')?>
This file is loaded in all layouts including the homepage layout.
In my checkout.xml file i placed this code to load the cart inside the homepage layout and to remove the sidebar cart:
<josil_homepage translate="label"> <remove name="cart_sidebar"/> <reference name="catalog.topnav"> <block type="checkout/cart_sidebar" name="cart.homepage" as="cart_homepage" template="checkout/cart/sidebar.phtml" before="-"> <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action> <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action> <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action> <block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout"> <label>Shopping Cart Sidebar Extra Actions</label> </block> </block> </reference> </josil_homepage>
I tried several configuration options, emptied all the sessions in my browser and the magento installation, but nothing is working.
Where do i have to look further?
UPDATE: For some reason, an exact copy is working on my localhost and not online..?
UPDATE2: Moved the xml from checkout.xml to page.xml. This is only working when i disable my cache. Strange thing is that when i enable my cache and flushing it, changes from my xml have been made in my store.
UPDATE3: When i change the xml reference from catalog.topnav to right or root, it works in those blocks with the cache enabled. I think it has something to do with my custom store menu block..?