Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default How can I allow COD to some specific pincodes only for domestic shipping?

    Hi, My site is http://shopping.muteyaar.org and i am from India.
    i am using zencart version 1.5.4

    I have a specific problem that many customers order through the Cash on Delivery mode in india, where there is no service available. I have to cancel those orders.
    I have an area pincode list available to which the COD service is available. Can I upload/update the list somewhere so that the orders are accepted only for those pincode areas?
    I tried to search, but could not find any such module/plugin.

    I will be thankful if someone can help me out here.

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    You need to stop the COD method being offered to customers with those postcodes, then they cannot choose it.
    In both payment and shipping modules there is a similar line at the beginning of the class which determines the if the module is enabled or not, such as this:
    PHP Code:
    $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true false); 
    You need to add your check for the postcodes after this line to change the state of "enabled" based on a postcode check:
    PHP Code:
    $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true false);
    if (
    this postcode is in some array) {
    $this->enabled false;

    Such as this
    https://www.zen-cart.com/showthread....09#post1262609
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  3. #3
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    Quote Originally Posted by torvista View Post
    You need to stop the COD method being offered to customers with those postcodes, then they cannot choose it.
    In both payment and shipping modules there is a similar line at the beginning of the class which determines the if the module is enabled or not, such as this:
    PHP Code:
    $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true false); 
    You need to add your check for the postcodes after this line to change the state of "enabled" based on a postcode check:
    PHP Code:
    $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true false);
    if (
    this postcode is in some array) {
    $this->enabled false;

    Such as this
    https://www.zen-cart.com/showthread....09#post1262609
    Thanks for the quick reply.
    I understand that I have to add some code to some file. But where can I put the list of postcodes are I want enabled or disabled?

    Can you please tell me a step by step procedure? I am not a professional developer and I have only small knowledge of php.

    Thanks in advance.

  4. #4
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    Actually, I want like this:
    (of course, for delivery within India only)

    A customer(from anywhere in the world) logs in to the website and gives an Indian delivery address.
    he adds items to the cart.
    clicks on Checkout button.
    chooses COD as payment option.
    clicks on confirm order button.
    System should check here if COD is available at the given pincode or not.
    if COD is available, then order gets confirmed.
    if COD is not available, then a message should be displayed such as " COD service is not available at your area pincode. Either choose a different payment method or a different delivery address"

    For this, I understand that I have to provide a list of enabled pincodes for COD service somewhere, which I do not know.
    And I have to add some code somewhere, which also i do not know.
    I will be thankful if you can tell me step by step procedure for this as I am not a professional developer.

    thanks.....

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    A customer(from anywhere in the world) logs in to the website and gives an Indian delivery address.
    he adds items to the cart.
    clicks on Checkout button.
    And he chooses a payment option. COD is NOT shown as an option AT ALL due to the code I gave you as an example which disables it depending on his postcode.

    There are commercial developers in the the forum who could do this for you, but I think you should source a developer locally as you will need one.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  6. #6
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    Quote Originally Posted by torvista View Post
    And he chooses a payment option. COD is NOT shown as an option AT ALL due to the code I gave you as an example which disables it depending on his postcode.

    There are commercial developers in the the forum who could do this for you, but I think you should source a developer locally as you will need one.
    I think you misunderstood me.
    I already have COD disabled for deliveries outside India. COD does not show at all for customers outside india.
    I just want it for Indian addresses.
    Actually we have more than 2000 pincodes where we deliver in India, and out of these, around only 40% are COD serviceable.
    So, I want that COD option should be available only for those pincodes.

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    You will need to hire someone to write the code for you. This is complicated and detailed. Not something any helper on this forum can do.
    20 years a Zencart User

  8. #8
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: How can I allow COD to some specific pincodes only for domestic shipping?

    Quote Originally Posted by schoolboy View Post
    You will need to hire someone to write the code for you. This is complicated and detailed. Not something any helper on this forum can do.
    Yes, I think that so.

    Anyway, thanks for replying..... I will update this thread when i succeed.

 

 

Similar Threads

  1. v151 Only allow certain shipping methods for some countries?
    By doooomed in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 1 Oct 2013, 12:30 AM
  2. How do I allow specific USPS International shipping options for certain items?
    By krsstore in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 28 Nov 2011, 12:14 AM
  3. Replies: 0
    Last Post: 23 Nov 2011, 08:32 PM
  4. COD possible only for domestic orders?
    By Rotkale in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 8 Jan 2007, 11:07 AM
  5. COD only for domestic orders?
    By Rotkale in forum Addon Payment Modules
    Replies: 1
    Last Post: 3 Jan 2007, 05:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR