magento中在购物车图标鼠标放上后可显示购物车中商品列表的代码
magento中在购物车图标鼠标放上后可显示购物车中商品列表的代码,如下图所示:
打包代码如下:
布局xml中的引用语法如下:
<default> <reference name="header"> <block type="checkout/cart_sidebar" name="cart_top" template="checkout/cart/topcart.phtml"> <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> </default>
在头部代码中的调用
近期评论