获得Magento中捆绑产品的“低至”价格

问题描述:

我试图使用我的自定义模板显示捆绑产品的列表。我无法显示捆绑产品的动态价格。以前对于我使用的简单产品:获得Magento中捆绑产品的“低至”价格

$product->getPrice(); 

哪些工作,但它只显示捆绑项目0.00美元。

看着../catalog/products/list.phtml我试图

$this->$getPriceHtml($product, true); 

我的块延伸到Mage_Catalog_Block_Product_Abstract我简单的产品重新工作后,但捆绑的产品仍然显示$ 0.00包装

有另一种显示价格与动态捆绑价格一样低的方式?

我清除缓存并重新编制索引,以及所有好东西。价格在默认类别列表下正确显示,不在我的自定义页面下。

更新

我一直无法找出一个替代。当我做的产品集合,包含价格捆绑产品领域的转储如下:

["price_type"] => string(1) "0" 

["price_view"] => string(1) "0" 
    ["_price_index"] => bool(true) 
    ["_price_index_min_price"] => string(8) "475.0000" 
    ["_price_index_max_price"] => string(8) "475.0000" 
    ["tax_percent"] => float(9) 
    ["final_price"] => int(0) 

对于简单的产品,我只得到:

["price"] => string(8) "248.0000" 
["final_price"] => string(8) "248.0000" 

,所以我想我可以写我自己函数来获取价格取决于产品的类型,但我猜有一个更好的办法...

+1

的Magento的版本? – 2010-05-29 00:12:48

+0

抱歉,延迟响应。我使用1.3.2,但最终还是想开始进入1.4。 今天,我还在我们的销售产品区块中添加了一个捆绑产品(这是其他人添加的),我注意到了同样的问题。捆绑产品显示为0.00美元。 – dardub 2010-06-01 18:30:23

+0

1.3.2.2更精确 – dardub 2010-06-01 18:45:41

看看/app/design/frontend/base/deafault/layout/bundle.xml

<catalog_category_default> 
    <reference name="product_list"> 
     <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action> 
    </reference> 
</catalog_category_default> 

你应该添加你的自定义phtml(不需要控制需要xml那样做)。从你的包/目录/产品/ price.phtml开始得到你所需要的所有功能;)好运气

你可以使用我的Magento模块:

https://github.com/head82/KH_ExtendedBundlePrice