0
votes

I'm using Magento 1.8.0

How can I get the tier prices of the associated product?

I'm only getting the price of the configurable product. Below is my site example:

Example: Product Apple is a configurable product thas has tier prices, $10,$20,$30. Product Apple has also an associated product like Green Apple, it has tier prices, $15,$20,$30.

My question here, is how can I get the value of my Associated products.

Thanks and Have a good Day!

1

1 Answers

0
votes

You have to firstly get associated products

$product = Mage::getModel('catalog/product')->load(1); //your_product_id
$childProducts = Mage::getModel('catalog/product_type_configurable')
                    ->getUsedProducts(null,$product);   
foreach($childProducts as $child) {
    $id = $child->getId();
    $pro = Mage::getModel('catalog/product')->load($id); //load associated product id
    if($pro['tier_price'] != NULL) {
        foreach($pro['tier_price'] as $tier){
            echo $tier['price'].'<br/>';
        }
    }
}