1

I've previously edited a payment method to only allow it to only be used in the back end admin order creation page visa copying a file to code/local/mage/payment/model/methiod and adding the following code to only allow it in back end.

protected $_canUseInternal = true;
protected $_canUseCheckout = false;

Is there a method for doing this with shipping methods as we need to take telephone orders and only allow a free shipping option for back end orders.

1 Answer 1

1

unfortunately there is note 'code-related' way of enabling a specific method similar to the method applied for payment methods. Not that straight at least.
Here is what you can do:
Option 1 : No code approach
The Free shipping method can be enabled/disabled at website level.
So you can enable it on the the default config values and disable it for each website you have.
I'm not 100% sure this method works...

Option 2: Code required
each shipping method model has a method called collectRates that checks if the method is active.
For free shipping the verification is done like this:

    if (!$this->getConfigFlag('active')) {
        return false;
    }

You can make it not return false in case you are on the admin store view (creating an order from admin).

    if (!$this->getConfigFlag('active') && Mage::app()->getStore()->getId() != 0) {
        return false;
    }

Option 3: Long shot
You can enable the free shipping method but make it available only when the order subtotal is over an outrageous value like 9999999.
Then create a coupon code that only makes free shipping available.
Use that coupon when creating an order from the backend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.