0
votes

I am having an issue in my magento mini cart .

when i go to a product page and click on Add to cart , my mini cart does not update and show the product items on the product page but the products are added to cart once i go to the cart page.

I am creating a local.xml file for my theme and having this code here

<block type="checkout/cart_sidebar" name="custom_mini_cart" template="checkout/cart/mini.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>

and on my header.phtml

I am calling this like

 $cart_html = $this->getChildHtml('custom_mini_cart');

It works fine when i go to cart page or checkout page.

product quantity and items don't show up on product page in minicart

any help will be appreciated

Thanks

1
which magento version.. r u using?Amit Bera

1 Answers

0
votes

Theres a slug that defines which pages this will work on.

In this case, it should be under the slug

<default>
    Your code goes here.
</default>

My guess is that you have it under:

<checkout_cart_index translate="label">
    I believe you probably have it under this one. 
</checkout_cart_index>

What this states is that even though you're adding your content to the header. You will only be adding it to pages that are part of the cart_index

Hope this solves your issue