如何在Magento Checkout页面上显示更新购物车?

时间:2015-05-01 16:02:06

标签: php magento checkout cart

我正在尝试在结帐页面上显示更新购物车,有什么方法可以显示吗?

<?php echo $this->getChildHtml('form_before') ?>
    <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
    <?php echo $this->getBlockHtml('formkey'); ?>
<button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><?php echo $this->__('Update Shopping Cart'); ?></button>
</form>

1 个答案:

答案 0 :(得分:0)

在local.xml文件中添加以下代码

应用程序/设计/前端/ YOURPACKAGE / YOURTHEME /布局/那个local.xml

<checkout_onepage_index translate="label">
    <reference name="right">
        <block type="checkout/cart_sidebar" name="cart_sidebar" 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>
</checkout_onepage_index>