Showing posts with label Remove Shipping Method tab in One Page Checkout - Magento. Show all posts
Showing posts with label Remove Shipping Method tab in One Page Checkout - Magento. Show all posts

Remove Shipping Method tab in One Page Checkout - Magento

If your shipping method is Free shipping and if you want to remove the shipping method tab from Onepage checkout steps, You can do the following steps:


Copy app->code->Mage->Checkout->Block->Onepage->Shipping-> Method.php

and put into

app->code->local->Mage->Checkout->Block->Onepage->Shipping-> Method.php

Replace the function

public function isShow()
{
return !$this->getQuote()->isVirtual();
}

With

public function isShow()
{
if(array_key_exists('freeshipping', $this->getQuote()->getShippingAddress()->getGroupedAllShippingRates()))
return false;
return !$this->getQuote()->isVirtual();
}


Noe: Simple way that magento provides is, Adding Virtual Type or products, this wont show the shipping information as well as shipping method in the one page checkout.