How to change shipping rate in Percent

How to change shipping rate in Percent

app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php

find line

$method->setPrice($shippingPrice);

and put following code above that line

 

   $session        = Mage::getSingleton(‘checkout/session’);

            $quote_id       = $session->getQuoteId();

            $item_quote     = Mage::getModel(‘sales/quote’)->load($quote_id);

            $shippingPrice  = $item_quote->getSubtotal()*($this->getConfigData(‘price’)/100);

 

0