Magento – special price for the simple products of a configurable product

magento-1.7magento-enterpriseprice

I am doing a project and now it needs a requirement such that we can assign special price for the single products of a configurable product. This price must be seen with strike through with the original price. I tried out by editing configurable.php by fetching the special price of each simple product of a configurable product. The problem which I am facing is the simple product's special price which is assigned is getting correctly but for those which is not assigned in the same configurable product, the last simple product's special price is coming.

My question is can I implement my requirement on Magento or what I am doing wrong?

Please help? The following is the way I tried to implement my need.

<?php
$obj = Mage::getModel('catalog/product');    
if (isset($options[$attributeId][$value['value_index']])) {    
       $productsIndex = $options[$attributeId][$value['value_index']];    
       $_product = "";   
       foreach ($productsIndex as $pr):    
              $_product = $obj->load($pr);    
              if (!empty($_product) && !is_null($_product)) {   
                   $npr[$pr] = $_product;    
              } else {    
                  $npr[$pr] = 0;    
              }   
              unset($_product);    
      endforeach;    
   } else {    
      $productsIndex = array();

}
?>

Best Answer

Magento is very flexible and there are some ways to implement the tier prices to the custom options. You can, for example, do this through basket price rules, the extension ‘Best Configurable Products’ or individual options with the prices. You can see a comparison about these approaches in the following site: http://www.code4business.de/magento-tier-prices-custom-options/

The post also shows how to implement custom prices for each custom option virtually without rewrites.