Hide Shipping method from cart page in magento

you can Hide Shipping method from cart page in magento on 2 ways

1 way to hide current shipping method on cart through Qutoe:-

$quote = Mage::helper('checkout/cart')->getCart()->getQuote();
$shippingMethod = $quote->getShippingAddress()->getShippingMethod();
if($shippingMethod){
    $quote->getShippingAddress()->setShippingMethod(null);  
    $quote->save(); 
}
 

2 way to hide current shipping method on cart through Session:-

if($shippingMethod=Mage::getSingleton('checkout/session')
->getQuote()->getShippingAddress()
            ->getShippingMethod()){
Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()
            ->unsetShippingMethod($shippingMethod);
}

 

Get configurable option and value if parent and child known

Suppose configurable product id is $configProductId and the Simple
product id is $simpleProductId.
Fetch configurable attributes values.

$product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($configProductId);
$attributes = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product); 

Now load simple product by simple product id.

$child = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($simpleProductId);


foreach ($attributes as $attribute){
    //ID of the option will give
    echo $attribute['store_label'].' = '.$child->getData($attribute['attribute_code']).'<br />'; 

    //LABEL of the option Will give
    foreach ($attribute['values'] as $value){
        $childValue = $child->getData($attribute['attribute_code']);
        if ($value['value_index'] == $childValue){
            echo $attribute['store_label'].' = '.$value['store_label'].'<br />';
        }
    }
}