// this just checks to ensure it's a configurable product;
// if you know the product is configurable already, you don't need
// this step
if ($product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE){
$associated_products = $product->getTypeInstance()->getUsedProductCollection($product);
foreach ($associated_products as $associated_product){
//print_r( $associated_product->getTierPrice() );
}
}
1 回答
尝试获取相关产品集合并迭代它们,如下所示:
编辑:快速说明 . 此代码假定Magento 1.6 . 我不记得1.4是否有
TYPE_CONFIGURABLE
类不变,但我相信它确实如此 . 如果没有,此代码可能需要调整旧版本的Magento .