On load how to change the product price display this new price

$Ringprice = $goldprice18*$_product->getWeight()+$_product->getPrice();

enter image description here


You can try adding additional price via observer

Add This event in your module config xml file



Create a Observer



class Namespace_Modulename_Model_Observer 
    public function addAdditionalPrice(Varien_Event_Observer $observer)
            $product = $observer->getProduct();
            $goldprice18 = 10;

            // Set Product original price.
            $productOriginalPrice = $product->getPrice();
            $productNewOriginalPrice = $goldprice18 * $product->getWeight() + $productOriginalPrice;


            // Set product final price.
            $productBasePrice = $product->getFinalPrice();
            $productNewFinalPrice = $goldprice18 * $product->getWeight() + $productBasePrice;

|improve this answer|||||
  • thanks its work. Now i need to check with attribute set and depend upon the gold purity i have to get the price. Eg: gold purity dropdown 18k admin will set. Admin can set any purity 22k,24k ect. – Suma J Aug 22 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.