In Magento 1.x all shipping rates calculation done by a collect rate function
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
if (!Mage::getStoreConfig('carriers/' . $this->_code . '/active')) {
return false;
}
/*************** Start Logic to calculate rates****************/
/***************End Logic to calculate rates****************/
}
So if we want to hide that specific shipping method from the list in checkout page frontend. Then what is the correct way to do this.
Best Answer
You can create a method in your custom Module helper to check, It is in Admin area or frontend area. Like below:
And You can add below condition in shipping method
collectRates
orgetAllowedMethods
function to not show shipping method in frontend.Frontend check code taken from alan answer: https://stackoverflow.com/questions/9693020/magento-request-frontend-or-backend