Magento Restrict Shipping and Cash on Delivery for a location

About Restrict Shipping And COD

In many cases admin wants to have an option to restrict Cash On Delivery option for a specific location due to unavailability of service. This extension allows admin user to list down the Zip/Postal Code where product will not have Cash On Delivery option Same way admin can decide if the shipping service is available or not for a specific location by listing down the Zip/Postal Code. Even admin can enable this feature for complete store or for a set of products

Advance checking and restriction of Zip/Postal Code is a very useful feature in making the online shopping experience convenient. This feature allows user to know whether or not a product will be delivered at the user-desired location with or without Cash On Delivery. This feature facilitates customer to have better buying experience and enhances customer satisfaction.

This extension allows user to check product availability in its location by entering Zip/Postal Code of the location. If product is not available then extension gives appropriate message and does not allow customer to checkout. This extension facilitates you to restrict shipping & COD based on Zip/Postal Code. This extension also improve customer support to check their shipping facility using Zip/Postal Code.

 

Feature
  • Allow Cash On Delivery for specific Zip/Postal Code.
  • Allow shipping methods only for specific Zip/Postal Code.
  • Check Cash On Delivery and shipping availability on the product details page.
  • Retain last checked Zip/Postal Code in product details page using cookie.
  • This module gives relaxation for customize Success/Failure message of service availability.
  • It provide you to set different Zip/Postal Code for shipping and Cash On Delivery restriction.
  • It provides shipping restriction for complete store or for a set of products.

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 “CheckDelivery” 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_CheckDelivery –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_CheckDelivery –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 >> DOYENHUB >> Check Delivery Settings

EnabledYes/No (Select ‘Yes’ to enable the extension)

2. Configure these extension settings as per your requirement

Display On Product PageSelect ‘Yes’ If you want to display delivery availability check form on product view page.
Available ZIP CodeEnter delivery available zipcode(s) with comma(,) separated.
TitleEnter the text to be display for title of block on product view page.
Text PlaceholderEnter the text to be display for placeholder of textbox on product view page.
Check Button LabelEnter the text for display check button text on product view page.
Change Button LabelEnter the text for display change link text on product view page.
Product Page Success MessageEnter the text for display success message for product view page.
Product Page Failure MessageEnter the text for display error message for product view page.
Product page Change MessageEnter the text for display session message for product view page.
Checkout Success MessageEnter the text for display success message for checkout.
Checkout Failure MessageEnter the text for display error message for checkout.

3. Configure these extension settings, if you want to add zipcode validation only for some product id(s).

Product levelSelect ‘Yes’ to validate selected product(s) only.
Product Id(s)Enter product id(s) with comma(,) separated to validate zip code.

4. Configure these extension settings, if you want to restrict COD (cash on delivery) payment method for some zipcodes.

Enable COD RestrictionYes/No (Select ‘Yes’ to enable the COD restriction)
Zip codeEnter COD available zip code(s) with comma(,) separated.
Success MessageEnter the text for display success message for product view page.
Failure MessageEnter the text for display error message for product view page.
Admin/Backend
1. Enable Check Delivery
You can enable/disable Check Delivery functionality as per your requirement.
2. Show on product view page
By enabling this you can show the Check Delivery form on product view page.
3. Available zip code
You can enter all delivery available zipcodes with comma(,) separated in below shown area. If this is empty it will be consider as delivery available for all zipcodes.
4. Custom fields for product view
Configure these extension settings as per your requirement for product view page.
5. Custom fields for checkout
Configure these extension settings as per your requirement for checkout page.
6. Product level
Configure these settings if you want to add zipcode validation only for some product id(s). You can enter product id(s) with comma(,) separated in below shown area for which you want to add Check Delivery validation. Rest product will available for all area.
7. COD Restriction
You can allow the COD (cash on delivery) payment method only for specific zipcodes and other then that zipcodes COD (cash on delivery) payment method will not be available.
Frontend

1. Product view page

Here you can see both COD and Delivery is available in your area. You can change the section title, button text, and both message text from extension configuration setting in admin.
Here, COD is not available at entered zipcode.
When Delivery is not available at entered zipcode, then it will display like this. here COD message will not display because delivery is not available at entered zipcode.

If user has already entered a zipcode and that zipcode is valid for current product then we will show below message. You can change the section title, link text, and both message text from extension configuration.Note:

  • When product level validation is enabled it will validate only those product, which product id(s) are defined in extension configuration. Rest of the products delivery will be available for all zipcodes.
  • When product level validation is disabled it will validate all products with provided zipcodes.

2. Checkout page

On checkout page if delivery is available at entered zipcode it will show below message and all available shipping methods.
If delivery is not available at entered zipcode it will display message like below area and it will remove all shipping methods. 
If user have already shipping address(es) then all address(es) shown and if user selects any of these shipping address then validation runs and it will show success/error message and available shipping methods accordingly.
It will show COD (cash on delivery) payment method only if COD is available at user shipping address zipcode. Otherwise it will remove the COD (cash on delivery) payment method.
When COD payment method is not available it will display rest of the available payment methods.

Leave a Reply

Your email address will not be published. Required fields are marked *