Cash On Delivery activated Admin Only ( Not Frontend enabled ) - Magento?

Cash On Delivery activated Admin Only ( Not Frontend enabled ) - Magento?

August 12, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Cash On Delivery activated Admin Only ( Not Frontend enabled ) - Magento?

Enabling Cash On Delivery for Magento Admin Only

Cash on delivery is a popular payment method that allows customers to pay for their orders upon receiving them. However, in some cases, you might want to limit this option only for manual orders created through the admin panel, hiding it from your storefront.

Here’s a step-by-step guide on how to enable Cash On Delivery exclusively for Magento admins:

Step 1: Enable Cash On Delivery

First, ensure that the Cash On Delivery payment method is enabled in your system. Go to Stores > Configuration > Sales > Payment Methods. Find Cash On Delivery under the right-hand section and set its status to ‘Enabled’.

Step 2: Remove from Storefront

Next, we need to remove this option from the frontend store.

Open the file app/design/frontend/default/<your_theme>/template/payment/cashondelivery.phtml in a text editor. Replace all the content of this file with:

<?php echo $this->getMethodLabelBeforeHtml() ?>

This will remove the Cash On Delivery option from your frontend checkout page.

Step 3: Ensure Admin Only

Now, let’s ensure that only admins can access this payment method. Open app/code/core/Mage/Payment/Model/Method/Cashondelivery.php and find the following line:

protected $_canUseInternal = true;

Change it to:

protected $_canUseInternal = false;

This will remove Cash On Delivery from the frontend checkout while keeping it available for admin manual orders.

Advanced: Customizing Payment Method

For more control, you can create a custom payment method that inherits from Mage_Payment_Model_Method_Abstract and override the _isApplicable() function to check if the current user is an admin before applying the Cash On Delivery option. This approach provides better security and flexibility.

You can find detailed tutorials on creating custom payment methods in our blog post Custom Payment Methods in Magento: A Step-by-Step Guide.

Conclusion

Enabling Cash On Delivery for admin-only use requires a few strategic modifications to your Magento store files. By following this guide, you should be able to create manual orders with cash on delivery as the payment method while keeping this option hidden from your customers.

Remember that these changes are not part of the standard Magento configuration and require direct file manipulation. Always ensure to backup your files before making any changes and test them thoroughly in a development environment before applying them to your live store.

Additionally, consider implementing version control systems like Git for easier management and rollback if needed. For more advanced customizations, our Magento Development Services can help you achieve complex solutions seamlessly.

Checkout Themes Admin Configuration

Our network