About Cash On Delivery (COD) Charge
Cash On Delivery (COD) is currently one of the most popular payment mode for online web shops. The major reason for its popularity is that the customers do not have to pay anything before the products are delivered to them. In some countries this remains a popular option with internet-based retailers, since it is far easier to set up for small businesses and does not require the purchaser to have a credit card.
This payment method is the perfect solution for those customers who do not trust other payment methods, such as a card payment or PayPal, and prefer to pay upon receiving their order. With this method, you can offset the additional cost normally associated with COD by charging a fee to customers that choose this payment method.
Also some store owners would like to restrict this feature due to valid constraints like, distance between the store owner and their customer’s shipping address. To overcome this issue we have added the feature in this extension, which allows the store owner to restrict COD purchases to certain ZIP/PIN Codes. This extension also add an option of checking the availability of the COD payment method directly on the product page, making it convenient for customers to see if they will be able to use the option or not – well in advance.
This module allows you to add the COD payment method with the option of applying an extra fee and restrict COD purchases to certain ZIP/PIN Codes and allow to check the availability of Cash On Delivery payment method using ZIP/PIN Code directly on product page before placing the order.
- Allow to charge your customers the same fee regardless of the amount of the order.
- Apply a fee based on the percentage of the total order.
- The fee is displayed separately in the cart, order, invoice, invoice pdf, order email.
- The fee is calculated based on the store currency.
- Allows you to set a minimum and maximum order size to show this payment method
- Allow store owner to Add/Edit/Update PIN Code/ZIP code for Cash On Delivery method.
- Cash On Delivery payment method Auto Hide based on customer entered shipping address PIN Code/ZIP code.
- Allow to check the availability of Cash On Delivery using ZIP Code on product page.
- This extension gives relaxation for customize Success/Failure message of service availability.
Standard Feature:
- Follow Magento2 coding standards for this extension.
- Follows Magento2 extension development guideline.
- Compatible with latest Magento 2 editions.
Note:This extension will add another Cash On Delivery payment method on your Magento2 web store.
Installation
Your magento 2 extensions can be installed in a few minutes by going through these following steps
Step 1: Download/purchase the extension
Step 2: Unzip the file in a temporary directory
Step 3: Paste “CODCharges” folder into MagentoRoot/app/code/Doyenhub directory.
Step 4: Disable the cache under System >> Cache Management
Step 5: Enter the following at the command line to setup extension:
bin/magento module:enable Doyenhub_CODCharges –clear-static-content
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento indexer:reindex
Note: Clear the store cache, clear your browser cache, domain cookies, and refresh the page.
If you change theme from admin you have to remove pub/static and re-deploy pub/static.
Uninstallation
Enter the following at the command line to setup extension:
bin/magento module:disable Doyenhub_CODCharges –clear-static-content
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
User Manual
1. Go to, Store >> Configuration >> Sales >> Payment Methods >> Cash On Delivery
Enabled Yes/No (Select ‘Yes’ to enable the extension)
2. Configure these extension settings as per your requirement
New Order Status Select default ‘Pending’ for order confirmation with this payment method. Title Enter the text to be display on checkout payment method. Payment from applicable countries Select ‘all allowed country’ for allowed “Cash On Delivery Charge” payment method on all countries or for specific select “allow specific country”. Payment from specific countries Select specific countries for allowed “Cash On Delivery Charge” payment method. Available zip code Enter comma(,) separated zipcode for allowed “Cash On Delivery Charge” payment method. if empty then available for all zipcodes. Minimum Order Total Enter minimum order total for allowed “Cash On Delivery Charge” payment method or leave empty for disabling limit. Maximum Order Total Enter maximum order total for allowed “Cash On Delivery Charge” payment method or leave empty for disabling limit. Before Discount Select yes for calculate charge before adding discount in order total. Charge label If you want to display some note for take charges on checkout payment method, otherwise leave empty. Export Export sample file of charges or last entered file for you reference and verification of charges. Import Upload file for taking charges. This file is contain country, from amount, fee.
country: Should be “iso2 country” code or if you want to add charges to all country you can use country code as ‘*’. e.g US, PT.
from amount: Should be 0 or minimum order amount from that you want to apply charges.
fee: Should be 0 or any amount that you want to charge or you can also enter as ‘%’. e.g. 10, or 10%Sort order Enter sort order for displaying payment method on checkout.
3. Configure these extension settings as per your requirement for product page
Display On Product Page Select ‘Yes’ If you want to display cash on delivery availability check form on product view page. Title Enter the text to be display for title of block on product view page. Text Placeholder Enter the text to be display for placeholder of textbox on product view page. Check Button Label Enter the text for display check button text on product view page. Change Button Label Enter the text for display change link text on product view page. Product Page Success Message Enter the text for display success message for product view page. Product Page Failure Message Enter the text for display error message for product view page. Product Page Change Message Enter the text for display session message for product view page.
You can enable/disable cash on delivery charge functionality as per your requirement.
There is only one option “Pending” same as default cash on delivery payment method. you can see this pending status on new generated order.
You can enter title of Cash On Delivery Doyenhub payment method, for displaying on frontend checkout.
There are two options “All Allowed Countries” and “Specific Countries”, you can select as per your requirement, if you select “All Allowed Countries” then it will disable next field “Payment from specifc countries”.
You can select specific countries in which Cash On Delivery Doyenhub payment method will be available.
You can allow the Cash On Delivery Doyenhub payment method only for specific zipcodes and on rest of zipcodes Cash On Delivery Doyenhub payment method will not be available. For allowing all zipcodes you have to leave as empty.
Enter minimum order total for allowing “Cash On Delivery Charge” payment method from minimum order total or leave empty for disabling limit.
Enter maximum order total for allowing “Cash On Delivery Charge” payment method to maximum order total or leave empty for disabling limit.
Select “Yes” for calculate charge before adding discount in order total. If you want to take charges including cart discount then you have to select “No”.
Enter text for displaying note of take charges on checkout page payment method, otherwise leave empty.
Export sample file of charges or last entered charges file for you references and verification of charges.
Upload file for taking charges as your requirement. Their is below one tag line that will display you an count of charge rules that you entered through file.
[NOTE]
country: should be “iso2 country” code or if you want to add charges to all country you can use country code as ‘*’. e.g US, PT.
from amount: should be 0 or minimum order amount from that you want to apply charges.
fee: should be 0 or any amount that you want to charge or you can also enter as ‘%’. e.g. 10, or 10%
Enter sort order for displaying payment method on checkout.
By enabling this you can show the cash on delivery form on product view page.
Configure these extension settings as per your requirement for product view page.
Here you can see both cash on delivery is available in your area. You can change the section title, button text, and message text from extension configuration setting in admin.
if cash on delivery doyenhub is available based on admin requirement then it will display in checkout page.
On my orders page, order item, invoice and refund section cash on delivery charges will be display on order total section.