I have written a customized code to add different price of product on product page:
Code in: app/code/local/custom/price/etc/config.xml
<?xml version="1.0"?>
<config>
<global>
<models>
<price>
<class>custom_price_Model</class>
</price>
</models>
<events>
<checkout_cart_product_add_after>
<observers>
<custom_price_observer>
<class>price/observer</class>
<method>modifyPrice</method>
</custom_price_observer>
</observers>
</checkout_cart_product_add_after>
</events>
</global>
</config>
Code in : app/code/local/custom/price/Model/Observer.php
class custom_price_Model_Observer
{
public function modifyPrice(Varien_Event_Observer $obs)
{
// Get the quote item
$item = $obs->getQuoteItem();
// Ensure we have the parent item, if it has one
$item = ( $item->getParentItem() ? $item->getParentItem() : $item );
// Load the custom price
$price = "30";
// Set the custom price
$item->setCustomPrice($price);
$item->setOriginalCustomPrice($price);
// Enable super mode on the product.
$item->getProduct()->setIsSuperMode(true);
}
Still its not working. Kindly Help.