Magento迷你购物车未在产品页面上更新

时间:2014-09-23 14:51:32

标签: magento

我的magento迷你车有问题。

当我进入产品页面并点击添加到购物车时,我的迷你购物车不会更新并在产品页面上显示产品项目,但是一旦我进入购物车页面,产品就会被添加到购物车中。

我正在为我的主题创建一个local.xml文件,并在此处使用此代码

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

和我的header.phtml

我称之为

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

当我进入购物车页面或结帐页面时,它可以正常工作。

产品数量和商品不会显示在minicart的产品页面上

任何帮助将不胜感激

由于

1 个答案:

答案 0 :(得分:0)

Theres一个slug定义了哪些页面可以使用。

在这种情况下,它应该在slug下

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

我的猜测是你拥有它:

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

这表明即使您将内容添加到标题中也是如此。您只会将其添加到属于cart_index

的页面中

希望这能解决您的问题