So, I use the code below in combination with an extension like organic internet simple configurable products.
The code below is meant for the cart/checkout process, essentially, it's an update to the configurable price model that passes price calculation to a simple product in the event the product has been added to the cart --- this solution DOES NOT display pricing on the product page itself (however there are many extensions that do that already).
Update app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php (ideally you use an extension or local override in app/code/local)
Update the method: getFinalPrice, change to
public function getFinalPrice($qty=null, $product)
{
//Start edit
$selectedAttributes = array();
if ($product->getCustomOption('attributes')) {
$selectedAttributes = unserialize($product->getCustomOption('attributes')->getValue());
}
//End edit
if (sizeof($selectedAttributes)) return $this->getSimpleProductPrice($qty, $product);
if (is_null($qty) && !is_null($product->getCalculatedFinalPrice())) {
return $product->getCalculatedFinalPrice();
}
$basePrice = $this->getBasePrice($product, $qty);
$finalPrice = $basePrice;
$product->setFinalPrice($finalPrice);
Mage::dispatchEvent('catalog_product_get_final_price', array('product' => $product, 'qty' => $qty));
$finalPrice = $product->getData('final_price');
$finalPrice += $this->getTotalConfigurableItemsPrice($product, $finalPrice);
$finalPrice += $this->_applyOptionsPrice($product, $qty, $basePrice) - $basePrice;
$finalPrice = max(0, $finalPrice);
$product->setFinalPrice($finalPrice);
return $finalPrice;
}
Then add this function right below getFinalPrice:
public function getSimpleProductPrice($qty=null, $product)
{
$cfgId = $product->getId();
$product->getTypeInstance(true)
->setStoreFilter($product->getStore(), $product);
$attributes = $product->getTypeInstance(true)
->getConfigurableAttributes($product);
$selectedAttributes = array();
if ($product->getCustomOption('attributes')) {
$selectedAttributes = unserialize($product->getCustomOption('attributes')->getValue());
}
$db = Mage::getSingleton('core/resource')->getConnection('core_read');
$dbMeta = Mage::getSingleton('core/resource');
$sql = <<<SQL
SELECT main_table.entity_id FROM {$dbMeta->getTableName('catalog/product')} `main_table` INNER JOIN
{$dbMeta->getTableName('catalog/product_super_link')} `sl` ON sl.parent_id = {$cfgId}
SQL;
foreach($selectedAttributes as $attributeId => $optionId) {
$alias = "a{$attributeId}";
$sql .= ' INNER JOIN ' . $dbMeta->getTableName('catalog/product') . "_int" . " $alias ON $alias.entity_id = main_table.entity_id AND $alias.attribute_id = $attributeId AND $alias.value = $optionId AND $alias.entity_id = sl.product_id";
}
$id = $db->fetchOne($sql);
return Mage::getModel("catalog/product")->load($id)->getFinalPrice($qty);
}
You can see, in the event the user has "customized" the product (IE, selected configurable options) we determine the associated simple product and pass control to its pricing model, otherwise if the product isn't "customized" (IE, we're browsing on the product page) we proceed as normal