Question

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.

Was it helpful?

Solution

I found out why getTierPrices() was not return anything for configurable products with tier pricing.

This extension Simple Configurable Products is altering configurable tier pricing to return empty array.

In order to fix this issue go to this class OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product_Type_Configurable_Price in the following file:

app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Product/Type/Configurable/Price.php

And remove or comment this function:

public function getTierPrice($qty=null, $product)
{
    return array();
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top