All modulesMagento 2 module

Cash on delivery off for selected products

A product with one tick box makes the checkout hide cash on delivery for the whole cart.

€150 + VAT · one-off licence, installation optional

www.degriz.eu
Switch on one checkbox on a product and cash on delivery is no longer offered to the customer at checkout
About the module

What it does.

"An expensive item went out cash on delivery and the customer never collected the parcel." Every refused cash-on-delivery parcel means shipping and return costs and blocked stock.

What it looks like in practice

On an expensive or delicate product in the catalogue you tick "Disable cash on delivery". A customer who puts this product in the cart does not see cash on delivery at checkout and picks a card or a proforma invoice. For products without the tick, nothing changes.

What changes

  • A tick box on the product. For each product you decide whether it may be paid for on delivery.
  • It applies to the whole cart. If the cart holds at least one flagged product, cash on delivery is not offered.
  • No tampering with the checkout. The module only hides the chosen payment methods; it does not change the others.
  • Complements the weight limit. Together with the cash on delivery weight limit module you restrict cash on delivery by product and by cart weight.

Who it is for

For shops with cash on delivery that have products where the risk of refusal or return is too high: expensive items, made-to-order items, large or fragile parcels.

How you set it up

The tick box is on the product in the admin under Catalog › Products, in the Product Details group, the field "Disable cash on delivery". The module has no settings page; we set its list of payment methods and the on switch. Because it only changes the offer of payment methods, it is not tied to a theme.

Good to know

  • The module is switched on by default and hides the payment methods with the codes cashondelivery and phoenix_cashondelivery. If your shop uses another code, we set it on installation.
  • The list of payment methods and the on switch are not edited in the admin; we set them.
  • When cash on delivery is hidden the customer gets no special explanation and simply sees the remaining payment methods.
  • The module does not check the cart weight or amount. A separate module does that.

Want it in your store?

Install it yourself or choose installation and configuration when you order. Building a new store? Add it to your project in the Konfigurator.

Screens

Take a look at every step.

www.degriz.eu
One checkbox on the product in the admin: Disable cash on delivery
www.degriz.eu
A product without the checkbox: the customer can choose cash on delivery
www.degriz.eu
A product with the checkbox: no cash on delivery at checkout, the customer picks another payment
Installation

How to install it.

We install the module from our repository with Composer. We send you the user name and access key for the repository after purchase. If you prefer, we install it for you.

In the root of the Magento 2 store run the commands (replace UPORABNIK and DOSTOPNI_KLJUC with the user name and access key you received):

composer config repositories.degriz composer https://www.degriz.net/konfigurator/composer/packages/composer config --auth http-basic.www.degriz.net UPORABNIK DOSTOPNI_KLJUCcomposer require degriznet/m2_codproductrestrictionphp bin/magento module:enable Magelan_CodProductRestrictionphp bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy -fphp bin/magento cache:flush

Setup

In the admin open Catalog › Products, a product, the Product Details group.

  1. Open a product for which you do not want cash on delivery.
  2. Switch on the field "Disable cash on delivery" and save the product.
  3. Add the product to the cart and check that the checkout does not offer cash on delivery.
  4. If the shop uses a different payment method code for cash on delivery, tell us and we enter it in the module's configuration.

Where do I get the user name and the access key?

After the payment we e-mail you a link to create the access key. Keep the key safe: for security it is shown only once and we do not keep it in readable form. The user name (your project code) and all the commands, ready to copy, are in your account under My account > Module licences.

Lost the key? Create a new one in your account under Module licences; the old one stops working.

Technical details

Compatibility.

Just the facts.

Code
degriz_codproduct
Platform
Magento 2
Licence
One-off
Change log

Version 1.0.0 · 24 Aug 2026

  • First release: you can switch off cash on delivery for a product; if such a product is in the cart, that payment method is not offered.
After purchase

You are not left alone.

We develop and maintain the module ourselves, so you write to the people who know it line by line.

Installation

Installation and configuration are optional: choose them when you order and the price is added to the order (+ VAT). If more time is needed, we bill the rest separately.

Support

A bug that repeats on a clean Magento with the Luma theme we fix free of charge. Settings, customisations and other themes by time spent.

Updates

The licence includes 12 months of free updates for the Magento versions on the supported list.

We agree on a date after reviewing the request. User guides in the guide centre

Cash on delivery off for selected products

€150 + VAT

One-off licence for one store, no subscription. Installation and configuration are optional.

After payment you get the licence and access to our private repository: immediately with a card or PayPal, with a bank transfer (UPN) as soon as we receive the payment. 12 months of free updates are included.

Write to us

Install it yourself by following the guide, or choose installation and configuration above. If more time is needed, we bill the rest separately. We agree on a date after reviewing the request.

Anže Voh, Degriz

Questions about this module?

Write to us and we will answer personally.

[email protected] · +386 40 807 231

Cash on delivery off for selected products€150 + VATAdd to cart

Online store configurator

Redesigning your store or building a new one?

Put your own quote together in the configurator and see the price straight away. A few minutes, no obligation, no meeting needed.

  • Price straight away
  • No obligation
  • Straight to the developer
Open the configurator

Free and with no obligation

We use cookies for the proper functioning of the site, visit analytics and showing ads tailored to your interests. Read more in our privacy policy. By clicking "Accept all" you agree to the use of all cookies.