1

这个问题是关于 Magento 捆绑产品的:我想将捆绑产品定制部分添加到列表/网格视图中,而无需进入单独的定制表单。你能请任何人都可以给我一个解决方案吗?

我尝试了以下方法:

  1. 将以下部分添加到 catalog.xml <block type="bundle/catalog_product_view_type_bundle" name="product.list.bundle.options" template="bundle/catalog/product/view/type/bundle/options.phtml"> <action method="addRenderer"><type>select</type><block>bundle/catalog_product_view_type_bundle_option_select</block></action> <action method="addRenderer"><type>multi</type><block>bundle/catalog_product_view_type_bundle_option_multi</block></action> <action method="addRenderer"><type>radio</type><block>bundle/catalog_product_view_type_bundle_option_radio</block></action> <action method="addRenderer"><type>checkbox</type><block>bundle/catalog_product_view_type_bundle_option_checkbox</block></action> </block>

  2. 在listing.phtml中添加了以下代码

<?php if($_product->getTypeId() == "bundle"){
echo $this->getLayout()->getBlock('product.list.bundle.options')->setProduct($_product)->toHtml(); } ?>

但它没有用。

4

0 回答 0