Tag Archives: magento don’t show shipping method on cart page

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);
}