I have a configurable product with price, special price and tier prices.
I'm able to get the price, special price but not the tiered prices list.
All child products have the same price so instead of adding tiered price for each product, it will easier and faster to add them on the configurable product.
I'm having the following code in template/catalog/product/view.phtml
$_product = $this->getProduct();
$_tierPrices = $this->getTierPrices();
var_dump( $_tierPrices );
This variable $_tierPrices
will return an empty array. However if I replace getTierPrices()
with getDate('tier_price')
I'll get all the tier prices that are associated with the configurable product.
$_product = $this->getProduct();
$_tierPrices = $_product->getData('tier_price');
var_dump( $_tierPrices ); // print each tier price as array
So what make getData()
return prices and getTierPrices()
returns nothing?
Note: this happens with configurable products.