Magento:捆绑价格为 0.00

Magento: Bundled price is 0.00

Magento v1.7.0.2 几年来我们一直在使用这个版本。 我们有几个免费和付费的扩展,上个月我们创建了我们的第一个捆绑产品。 在列表视图中,某些产品的价格显示为 'Start at 0,00'。 其他捆绑产品没问题,并显示正确的最低价格。

我已经搜索了一段时间,但找不到可行的解决方案。 这是一个示例页面:http://www.scrapwebshop.nl/kado-tip.html

我终于让它工作了。这可能不是正确的,也不是最有效的方法,但结果是我需要的。这才是最重要的 ;)

我现在有一个分组产品,所以我遍历所有相关产品,将它们的价格放在一个数组中。接下来我排序以获得顶部的最低值并获得第一个数组条目。 我希望它能帮助别人:

$associatedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product);
foreach ($associatedProducts as $assoc) {
  $prices[] = $assoc->price;
}
sort($prices, SORT_NUMERIC);
$_minimalPrice = array_shift($prices);  
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPrice);
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPrice, true)