Reputation: 393
I created custom shipping method for magento. And this method needed only for orders created programmatically from others modules.
Question: How i can to hide this method from checkout form without disabling this method in store settings?
Upvotes: 0
Views: 648
Reputation: 24116
I assume the other modules will use your shipping method from admin context; so you could do something like this:
update your collectRates
method like this:
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
{
if (!Mage::app()->getStore()->isAdmin())) {
return false;
}
// rest of your code
This way, you should be able to have the shipping method active but only usable in admin context.
Upvotes: 1