Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Jun 2008
    Posts
    23
    Plugin Contributions
    0

    Default Free Shipping Based on Postal Code Zone?

    Hi Folks,

    I have a great opportunity to provide free shipping to the Greater Toronto Area, it is actually many Postal Codes and quite a large area. No other criteria has to be met, they can order 1 lb or 19 lbs, it doesn't matter. SHIPPING IS FREE! I am pretty confused about how to implement something like this and which module would work. I am going to only ship within Canada to start, probably flat rate based on 1 - 5 lbs. (it's coffee beans) Any ideas how to setup a FREE shipping area like this based upon a postal code and not weight or amount attributes? I love Zen cart and have setup the basis for a great store, I need to implement the shipping rules.

    Thanks so much for your help,

    Jim

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,020
    Plugin Contributions
    124

    Default Re: Free Shipping Based on Postal Code Zone?

    You're going to have to write a custom shipping module to achieve this.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jun 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Free Shipping Based on Postal Code Zone?

    Quote Originally Posted by swguy View Post
    You're going to have to write a custom shipping module to achieve this.
    Thanks swguy,

    Well, I guess after everything else i have done so far with Zen Cart, stepping into the custom module world is a next step.

    Any tips where to find info to begin or basic guidelines to follow when writing such things, I totally tweeked the template I used and am understanding php and css, now I have to get better at sql I guess.

    Thanks again,
    Jim

  4. #4
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: Free Shipping Based on Postal Code Zone?

    Quote Originally Posted by swguy View Post
    You're going to have to write a custom shipping module to achieve this.
    No you're not:
    dev.ceon.net/web/zen-cart/advshipper
    Last edited by Kim; 22 Jun 2008 at 05:15 PM.

  5. #5
    Join Date
    Jun 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Free Shipping Based on Postal Code Zone?

    Quote Originally Posted by bigbadboy View Post
    No you're not:
    dev.ceon.net/web/zen-cart/advshipper
    Thanks BBB,

    I am aware of Advanced Shipper, but I am not willing to pay over $80 Canadian for a module that works on an Open Source Cart, the whole reason I started with Zen Cart was because of the open source. I can go pay for a sponsored cart with all sorts of support if i want to pay $80.

    I'll piece something together and put a modified module up for everyone to use instead of Advanced Shipper. I need one specific feature and that's it, not all that Advanced Shipper offers.

    At one point I might need it, but not when I am just starting out.

    Thanks for the idea, but no thanks for now.

    Jim

  6. #6
    Join Date
    Jan 2004
    Posts
    66,407
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Free Shipping Based on Postal Code Zone?

    What are the postal codes you'll allow the free shipping on?
    Do you have a comprehensive list yet?
    I suspect you can probably base the logic off the first 2 or 3 characters of the postal code and still be accurate enough ... so, a shortened list would improve lookup/matching performance.

    If you have the shortened list, post it here ...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jun 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Free Shipping Based on Postal Code Zone?

    Quote Originally Posted by DrByte View Post
    What are the postal codes you'll allow the free shipping on?
    Do you have a comprehensive list yet?
    I suspect you can probably base the logic off the first 2 or 3 characters of the postal code and still be accurate enough ... so, a shortened list would improve lookup/matching performance.

    If you have the shortened list, post it here ...
    OK Dr,

    This is the 3 character list, if I get shorter than 3 it begins pulling in areas that are not covered by my shipping deal.

    Comma Separated listing,

    L1S,L1T,L1V,L1W,L1X,L1Y,L1Z,L3P,L3R,L3S,L3T,L4A,L4B,L4C,L4E,L4H,L4J,L4K,L4L,L4S, L4S,L4T,
    L4V,L4W,L4X,L4Y,L4Z,L5A,L5B,L5C,L5E,L5G,L5H,L5J,L5K,L5L,L5M,L5N,L5P,L5R,L5S,L5T, L5V,L5W,
    L6A,L6B,L6C,L6E,L6G,L6P,L6R,L6S,L6T,L6V,L6W,L6X,L6Y,L6Z,L7A,M1B,M1C,M1E,M1G,M1H, M1J,M1K,
    M1L,M1L,M1M,M1N,M1P,M1R,M1S,M1T,M1V,M1W,M1X,M2H,M2J,M2K,M2L,M2M,M2N,M2P,M2R,M3A,
    M3B,M3C,M3H,M3J,M3K,M3L,M3M,M4A,M4B,M4C,M4E,M4G,M4H,M4H,M4J,M4K,M4L,M4M,M4N,M4P,
    M4R,M4S,M4S,M4T,M4V,M4X,M4Y,M5A,M5B,M5C,M5E,M5G,M5H,M5J,M5K,M5L,M5M,M5N,M5P,M5R,
    M5S,M5T,M5V,M5W,M5X,M6A,M6A,M6B,M6C,M6E,M6G,M6H,M6J,M6K,M6L,M6M,M6N,M6P,M6R,M6S,
    M7A,M7Y,M8V,M8W,M8X,M8Y,M8Z,M9A,M9B,M9C,M9L,M9M,M9N,M9P,M9R,M9V,M9W

    I am not sure where you are headed with this, so please be fairly explicit when letting me know where this is going.

    Thanks so much, I appreciate your input,
    Jim
    Each day is an opportunity to be happy!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,407
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Free Shipping Based on Postal Code Zone?

    Try this:

    1. In /includes/modules/shipping/freeshipper.php, insert some new code, as shown:
    Code:
            if ($check_flag == false) {
              $this->enabled = false;
            }
    
          // check to see if postal code is in list of allowed codes:
          } else {
            $free_ship_postcodes = array('L1S','L1T','L1V','L1W','L1X','L1Y','L1Z','L3P','L3R','L3S','L3T','L4A','L4B','L4C','L4E','L4H','L4J','L4K','L4L','L4S','L4T','L4V','L4W','L4X','L4Y','L4Z','L5A','L5B','L5C','L5E','L5G','L5H','L5J','L5K','L5L','L5M','L5N','L5P','L5R','L5S','L5T','L5V','L5W','L6A','L6B','L6C','L6E','L6G','L6P','L6R','L6S','L6T','L6V','L6W','L6X','L6Y','L6Z','L7A','M1B','M1C','M1E','M1G','M1H','M1J','M1K','M1L','M1M','M1N','M1P','M1R','M1S','M1T','M1V','M1W','M1X','M2H','M2J','M2K','M2L','M2M','M2N','M2P','M2R','M3A','M3B','M3C','M3H','M3J','M3K','M3L','M3M','M4A','M4B','M4C','M4E','M4G','M4H','M4J','M4K','M4L','M4M','M4N','M4P','M4R','M4S','M4T','M4V','M4X','M4Y','M5A','M5B','M5C','M5E','M5G','M5H','M5J','M5K','M5L','M5M','M5N','M5P','M5R','M5S','M5T','M5V','M5W','M5X','M6A','M6B','M6C','M6E','M6G','M6H','M6J','M6K','M6L','M6M','M6N','M6P','M6R','M6S','M7A','M7Y','M8V','M8W','M8X','M8Y','M8Z','M9A','M9B','M9C','M9L','M9M','M9N','M9P','M9R','M9V','M9W');
            $customer_postcode = $order->delivery['postcode'];
            $check3digitcode = substr($customer_postcode, 0, 3);
            $valid_digits = in_array($check3digitcode, $free_ship_postcodes);
            if ($valid_digits) $this->enabled = true;
          }
        }
    2. Enable the "freeshipper" module in Admin->Modules->Shipping

    And give it a try.

    If it works for you, consider a donation.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jun 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Free Shipping Based on Postal Code Zone?

    Quote Originally Posted by DrByte View Post
    Try this:

    1. In /includes/modules/shipping/freeshipper.php, insert some new code, as shown:
    Code:
            if ($check_flag == false) {
              $this->enabled = false;
            }
    
          // check to see if postal code is in list of allowed codes:
          } else {
            $free_ship_postcodes = array('L1S','L1T','L1V','L1W','L1X','L1Y','L1Z','L3P','L3R','L3S','L3T','L4A','L4B','L4C','L4E','L4H','L4J','L4K','L4L','L4S','L4T','L4V','L4W','L4X','L4Y','L4Z','L5A','L5B','L5C','L5E','L5G','L5H','L5J','L5K','L5L','L5M','L5N','L5P','L5R','L5S','L5T','L5V','L5W','L6A','L6B','L6C','L6E','L6G','L6P','L6R','L6S','L6T','L6V','L6W','L6X','L6Y','L6Z','L7A','M1B','M1C','M1E','M1G','M1H','M1J','M1K','M1L','M1M','M1N','M1P','M1R','M1S','M1T','M1V','M1W','M1X','M2H','M2J','M2K','M2L','M2M','M2N','M2P','M2R','M3A','M3B','M3C','M3H','M3J','M3K','M3L','M3M','M4A','M4B','M4C','M4E','M4G','M4H','M4J','M4K','M4L','M4M','M4N','M4P','M4R','M4S','M4T','M4V','M4X','M4Y','M5A','M5B','M5C','M5E','M5G','M5H','M5J','M5K','M5L','M5M','M5N','M5P','M5R','M5S','M5T','M5V','M5W','M5X','M6A','M6B','M6C','M6E','M6G','M6H','M6J','M6K','M6L','M6M','M6N','M6P','M6R','M6S','M7A','M7Y','M8V','M8W','M8X','M8Y','M8Z','M9A','M9B','M9C','M9L','M9M','M9N','M9P','M9R','M9V','M9W');
            $customer_postcode = $order->delivery['postcode'];
            $check3digitcode = substr($customer_postcode, 0, 3);
            $valid_digits = in_array($check3digitcode, $free_ship_postcodes);
            if ($valid_digits) $this->enabled = true;
          }
        }
    2. Enable the "freeshipper" module in Admin->Modules->Shipping

    And give it a try.

    If it works for you, consider a donation.
    Dr. Byte,

    I have four words for you, You are the MAN!!

    Your code works like a charm! It was easy to implement and works perfectly.
    I have also have to send you kudos for your Canadian Tax Classes and Rates Config thread, again, as I have said before, easy to understand and easy to put to work.

    Now I have to decide if I am going with the Canada Post module or just going flat rate in my paid shipping, I also have to work out my IE css sheets so that everything looks just as great as it does in Firefox.

    Thank you, thank you, thank you,
    A donation will be forthcoming and the praises of Zen Cart and Dr. Byte shall rise from the depths of my gratitude.

    Thanks again and have a great day,
    Jim
    Each day is an opportunity to be happy!

  10. #10
    Join Date
    Jan 2004
    Posts
    66,407
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Free Shipping Based on Postal Code Zone?

    Sometimes I get one right here or there.
    Thanks for confirming that it worked for you!
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Validate registration based on postal code?
    By sandragrills in forum Basic Configuration
    Replies: 2
    Last Post: 30 May 2011, 03:22 PM
  2. Free shipping to a single postal code
    By Angelica in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 24 May 2011, 01:38 AM
  3. Zone Shipping Price based on Postal Code
    By lioncity in forum General Questions
    Replies: 2
    Last Post: 10 Oct 2009, 03:43 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