Wild Cards for postal codes shipping zones

This topic contains 29 replies, has 3 voices, and was last updated by Avatar Sushobhan 16 hours, 53 minutes ago.

  • Author
    Posts
  • #101096
    Avatar
    Craig
    Participant

    Hi there,
    At the bottom of this thread you indicated that WCFM would update code to fix the issue with wild cards. I don’t think this has happened yet because I can’t get them to work (after hours of testing and trying to figure out the issue)….my result is that this previous request has not yet been addressed in the code?

    https://wclovers.com/forums/topic/can-a-city-shipping-zone-used-along-with-a-general-state-shipping-zone-setting/

    Please review and advise.

    Attachments:
    You must be logged in to view attached files.
  • #101204
    Avatar
    Craig
    Participant

    Also I have confirmed that the following wild cards are working and not working

    V ____NOT WORKING – supposed to work of all postal codes starting with V
    V9 ____NOT WORKING – supposed to work of all postal codes starting with V9
    V9R ____WORKING – works for all postal codes starting with V9R
    V9R,V9S,V9T ____WORKING – works for all postal codes starting with V9R,V9S,and V9T
    V9R 5S5 ____WORKING – works for specific postal code V9R 5S5
    V9R-V9V ____NOT WORKING – supposed to work of all postal codes starting with V9R through to a range ending with postal codes starting with V9V
    (in other words all postal codes starting with V9R V9S V9T V9U V9V)
    V9R…V9V ____NOT WORKING – supposed to work of all postal codes starting with V9R through to a range ending with postal codes starting with V9V
    (in other words all postal codes starting with V9R V9S V9T V9U V9V)

    Can you please look at this and confirm what is going on. This has been an issue since Feb 2019 (When I first purchased your plugins) and I have not be able to go live because I can never get the shipping settings to work properly for Canadian postal codes.

    • #103027
      Avatar
      Sushobhan
      Keymaster

      You don’t need to use wildcard characters. In reference to your image, if you want to match all the postcodes starting with V9R, simply put that without ‘*’.

  • #101205
    Avatar
    Craig
    Participant

    ALSO I can not get the second shipping zone to work. Once the setting are set for the first zone the other zones created after it do not seem to have any effect.

    Please confirm that the cart is properly progressing to the next zone set up if the first zone settings do not match the customers address because for the life of me I can not get it to work.

    Attachments:
    You must be logged in to view attached files.
    • #103032
      Avatar
      Sushobhan
      Keymaster

      Hello,
      Zone doesn’t work that way. When you (admin) create multiple zones, you need to make sure that each zone is different by choosing different ‘Zone regions’. Also add them in order from specific to more generic, otherwise the first zone rules will always be implied.

      So say, there is country1 and you want to set different shipping for 2 of its states (state1, state2), and keep a different rate for rest of the states. To achieve this, you need to create 3 zones, one for state1, one for state2, and one for country1. As rules gets applied from first to last, so the last rule (country1) will gets executed only if the address is not from state 1 or 2.

      I can understand setting shipping zones are kind of tricky sometimes. Let me know if you find my explanation it helpful.

  • #101987
    Avatar
    Craig
    Participant

    Good day. I wanted to follow up on this to see if you were able to find the glitch of why this is happening?

    1. The postal code formats
    2. only the first shipping zone works. any zone created after zone one are not beening applied.

  • #102403
    Avatar
    Craig
    Participant

    In addition to this I have also tested with the “StoreFront” theme to rule out if my theme was the issue and I have confirmed it has not.

    Can you please please look into this?

    Can you confirm if the shipping methods created after the first one are taking effect with postal codes?

    I really need to get this resolved….as you know shipping is a very important piece to a eCommerce.

    Many thanks

    Attachments:
    You must be logged in to view attached files.
  • #102413
    Avatar
    Craig
    Participant

    and finally as another test to rule out postal codes I also enabled USA states and tested that. Same result….and shipping method after the first one will NOT take effect. see attached screenshots for
    Alaska state (the first shipping method) – worked!
    and
    Georgia state (second in line shipping method) – did not work!

    Attachments:
    You must be logged in to view attached files.
  • #102432
    Avatar
    Craig
    Participant

    I need to make a correction.
    Where I say “shipping method”…I mean “shipping zone” (not the shipping methods withing the zones…but the zones themselves)

  • #103057
    Avatar
    Craig
    Participant

    Hi Sushobhan,

    Thanks for your reply and explaining this further. I very much appreciate I will do some more testing but have some follow up questions.

    1. Regarding wild cards
    -if “V9R” works for all postal codes starting with V9R should “V” work of all postal codes starting with V and should “V9” work of all postal codes starting with V9

    -is there one for a “range” of codes? In the wooCommerce documents they indicate that V9R…V9V is supposed to work of all postal codes starting with V9R through to a range ending with postal codes starting with V9V (in other words all postal codes starting with V9R V9S V9T V9U V9V)

    2. Regarding setting up the tables as an ADMIN. See the screenshot below.
    I have created 10 zones with each region stated as “Canada” (which sounds like the problem as you described above). My intention was to allow the vendors flexibility in adding the “provinces” if they choose when they set up their shipping methods in each store.
    What is the best way to do that?
    Vendor #1 wants to have shipping rates for “just canada” (so they use Zone one as Canada” in their shop settings)
    Vendor #2 wants different rates for each province (so they use all 10 zones and have a different province listed for each in their shop settings)
    Vendor #3 want to have shipping costs for his city, rest of province, and rest of Canada (so they use 3 zones, one with postal codes, one with British Columbia, and one with Canada).

    Is there away to set this up in Admin panel to allow this flexibility between vendors and their shipping methods>?

    Attachments:
    You must be logged in to view attached files.
  • #103089
    Avatar
    aemr45
    Participant

    Hi Craig,

    Please let me jump in, the only way I have found is to order this zones, first the one with postal codes, then the one with province and then the country.

    I also need that vendors be able to determine specific shipping prices for local shipping and that customers can choose local pick up only if they are in the same city (postal code range) as the vendor.

    The problem here is that for this to work, the seller needs to order the postal codes of his city to the top.

    If you as admin set up zones of different cities (postal codes) and put them on top of province, the vendor would have to add shipping methods to each city…

    I’m looking to a different approach, Plugin Hive has some plugins compatible with wcfm marketplace, and with one of their plugins, table rate shipping pro, you can set different shipping rates depending on city name, but the thing here is that we need that the city in the rule table get the city name from the vendor.

  • #103109
    Avatar
    Craig
    Participant

    aemr45 thanks for adding your info. This is very informative and rather great sanity check as I have been pulling my hair out trying to get these shipping settings to work.
    …and then feeling defeated thinking “If I can figure this out how can I expect a vendor?”

    I did not think that the shipping requirements for my marketplace requirements were overly in that vendors need the ability to identify their own zones/shipping methods because every business is different. Some will sell right across Canada some will only sell within city limits etc.

    It sounds like an additional plugin may be needed to do this and more research is needed. The Plugin Hive is one that I will look into as well.

    Please let me know if you find something and I will certainly do the same.

    Again thanks so much for adding your information here.

  • #103111
    Avatar
    Craig
    Participant

    This was the marketplace plugin I had used previously and their flat rate shipping setup was pretty flexible for vendors to create their own zones/tables as many as they needed in each shop
    https://docs.wcvendors.com/knowledge-base/wc-vendors-pro-shipping-system/

    Attachments:
    You must be logged in to view attached files.
  • #103371
    Avatar
    Craig
    Participant

    I have still failed.

    I have tried once again with these shipping zones can can not get them to work for postal codes. This as been a frustrating many months trying to sort this out!

    “the only way I have found is to order this zones, first the one with postal codes, then the one with province and then the country”.

    I did this set up and still no luck. only the FIRST shipping table is being applied.

    WC Lovers please help and confirm if you can get these shipping setting to apply for Canada and postal codes.

    Please show me how to make the following work
    Shipping to any postal code V9R = $10 (Works as zone 1)
    Shipping to rest of British Columbia = $20 (won’t work as zone 2)
    Shipping to all of Alberta + $30.00 (Wont work as Zone 3)

    Attachments:
    You must be logged in to view attached files.
  • #103379
    Avatar
    Craig
    Participant

    Here is a possible bug.

    I turned on the WooCommerce -> System status -> Tools and checked “Shipping Debug Mode” Checkbox

    and the message being displayed No matter what address I enter keeps saying “Customer matched zone “Local Shipping Zone” EVEN when it SHOULD match Zone 2 or Zone 3.

    WC Lovers please help.

    Attachments:
    You must be logged in to view attached files.
  • #103381
    Avatar
    Craig
    Participant

    for some reason the system won’t consider the other zones.

  • #103399
    Avatar
    Sushobhan
    Keymaster

    Hello,
    I have tested and it is working as expected. When I recheck your snapshots, I found a conflict between the attached two. In admin screen the Local Shipping Zone shows Zone as Canada, but in vendor screen it is showing as ‘Everywhere’.

    The following is the settings I’m using-
    1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
    2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada or British Columbia
    b. Click on Limit to specific ZIP/postcodes and enter V9R*
    3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
    4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

    Attachments:
    You must be logged in to view attached files.
  • #103402
    Avatar
    Sushobhan
    Keymaster

    Also attached the checkout screen to confirm the settings are applied correctly

    Attachments:
    You must be logged in to view attached files.
  • #103466
    Avatar
    Craig
    Participant

    Hi Sushobhan,

    Thanks for responding. I have tried with every way on the settings. I was screen shooting them all but must have attached the wrong one.

    Regarding the postal code setting in the ADMIN side would not work for a marketplace. I was expecting that each vendor can limit their postal codes from their vendor dashboard settings?

    Is that not the case?

    So what I would expect is:

    The following is the settings
    1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
    2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada (Not British Columbia)
    Then the vendor would add the Limit to specific ZIP/postcodes and enter V9R (not * as that wild card does not works from the WCMF dashboard) from their shop dashboard settings
    3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
    4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

    (and I would add a zone for each province)

    would the above work?

  • #103863
    Avatar
    Craig
    Participant

    Sushobhan,

    I set my shipping zones just as you described above
    T
    he following is the settings I’m using-
    1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
    2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada or British Columbia
    b. Click on Limit to specific ZIP/postcodes and enter V9R*
    3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
    4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

    AND it works too!!!

    BUT my question is….setting the postal code in ADMIN side won’t make sense for other vendors. how do we let vendors put their own postal code limits.

    That is what I have been trying to figure out.

    When I set the admin setting this way (see below)…Zone 2 or Zone 3 are never applied. It looks like basically when I try to restrict the “local zone” (First zone) from the VENDOR settings the shipping zones don’t work correctly.

    1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
    2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada (Not British Columbia)
    Then the vendor would add the Limit to specific ZIP/postcodes and enter V9R (not * as that wild card does not works from the WCMF dashboard) from their shop dashboard settings
    3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
    4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

    Your thoughts?

    Attachments:
    You must be logged in to view attached files.
  • #104041
    Avatar
    Craig
    Participant

    Sushobhan – I guess what I was expecting is that the vendor would have the ability to add the postal code limitation in their zone settings rather than on the admin side.

    Adding the limitation on the admin side would apply to every vendor which is not the case on a marketplace website. Each vendor will have different postal codes to enter based on their location.

    My understanding (based on WooCommrce documentation) is that The first zone being that zone where they can enter in the postal code limits which is typically where they would enter in any kind of local shipping options.

    Can you please confirm the following:
    Is my assumption above correct?
    Will WC lovers update their code to allow this?

    This is a critical piece to my marketplace to allow vendors to define there postal code limits.

    Thanks for your attention to this.

  • #104209
    Avatar
    Sushobhan
    Keymaster

    Hi,
    When you setup zones in this order – Canada, British Columbia, Alberta, then there is no way your zone 2 or 3 will ever gets applied. As I mentioned before, the zones are matched from top to bottom. So for any location in Canada, the first rule is a match and thus rule 2 or 3 will never get a chance even if people put their Province as British Columbia or Alberta.
    This restriction is coming from WooCommerce. It only checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule.
    I can think of another approach, see if that suits your purpose. First create different zones, one for each province. Also a last zone with Canada set as region. Now what your vendors can do, they can set shipping charges to all other province apart from their own and then they can use the last zone (Canada) along with the postcode restriction to offer Local shipping.

  • #104245
    Avatar
    Sushobhan
    Keymaster

    Hi,
    Sorry, my last suggestion will not work in your case. When you create zone against each province then also WooCommerce will select the first zone that matched the buyers province. And hence the last rule i.e. Canada will never gonna applied. Sorry but at this moment I don’t have a solution for your case. I’ll try few more coding tweaks and let you know if got any success. On a different note, your request for support of postcode range is accepted by our dev team, it will be added to our future release.

  • #104258
    Avatar
    Craig
    Participant

    Hi Sushobhan,

    I very much appreciate your attention to this.

    In my mind I’m thinking it is a marketplace coding issue because basically all I’m expecting is that the vendor shipping settings to respond the same way as the admin settings you previously demonstrated as working in your Jan 23 post above.
    (checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule)

    This was your Jan 23 zone settings:
    1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
    2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada or British Columbia
    b. Click on Limit to specific ZIP/postcodes and enter V9R*
    3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
    4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

    SO when the ADMIN settings are set as above the shipping settings worked exactly as I have been trying to do.
    Zone 1 (Canada) worked when a V9R postal code is used
    Zone 2 (British Columbia) worked any other British Columbia address was used
    Zone 3 (Alberta) worked any Albert address was used

    SO this also means that with the above zone structure WooCommerce is working as expected
    “checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule.”

    The only thing I’m looking for (that I think the marketplace plugin needs to do) is instead of the ADMIN doing:
    b. Click on Limit to specific ZIP/postcodes and enter V9R* (in the first zone)
    that the vendor should be able to Click on Limit to specific ZIP/postcodes and enter V9R* in THEIR zone settings.

    And wooCommerce should still function the same
    “checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule.”

    Again thanks you for your time and attention to to this.

  • #104648
    Avatar
    Craig
    Participant

    Hi Sushobhan,

    I wanted to follow up on this to confirm the issue and if WC Lovers will be able to rectify.

    My marketplace is essentially broken without this functionality to mirror the wooCommerce shipping zones (but have the vendor enter the limiting postal codes).

    Thanks.
    Craig

  • #104680
    Avatar
    aemr45
    Participant

    Hi Craig,

    I see Sushobhan commented:

    your request for support of postcode range is accepted by our dev team, it will be added to our future release.

    That’s really good news.

    In the mean while you can use Storepep, I get to accomplished what I needed with this plugin!! The downside is that you as admin need to add all postal code regions and rules, but at least it works. Pluginhive is a really good plugin and have a by city name solution but is not ready for multivendor yet. That’s why I chose the Storepep plugin.

    In my case, I will add all Cities (postal code ranges) of my vendors. First of all I will ask my vendors to tell me their shipping needs, for example, local shipping flat rate, local pick up available or not, and especial flat rates for cities near by. Then I will add them to specific rules. Vendors can also have their own carrier account and have realtime shipping costs of DHL, UPS, FEDEX, Canada Post and others, and again vendors need to give you the admin this information so you can configure it in the admin account, but this way you can control if they use their carrier account or yours.

    I hope this solution works for you as well as for me.

  • #104725
    Avatar
    Craig
    Participant

    Hi aemr45,

    Thanks for taking the time to add your suggestion. I’m definitely going to check out Storeprp! as an enhancement to shipping.
    Adding all the regions sound like a rather monumental task…but hey if that is what I need to do…
    I love the option to real time shipping costs.

    I have a couple of questions:

    1. For the multi-vendor features they indicate a prerequisite that “Dokan Multi vendor plugin is already installed on your WooCommerce Store” – is this true or are you using only the WC lovers plugins? (I don’t use that plugin currently).

    2. How may vendors do you plan on accommodating? My marketplace is designed to accommodate 1000’s of vendors (local small businesses similar to ETSY). The task you described “I will ask my vendors to tell me their shipping needs, for example, local shipping flat rate, local pick up available or not, and especial flat rates for cities near by. Then I will add them to specific rules.” sounds like the set up for each vendor will take some time and attention – When you are adding those shipping needs for each vendor has it been onerous?

    3. The Storeprp plans are based on the number of ordered full fulled. Do you know if orders of Virtual products not shipped (or pick up in store) attribute to that plan threshold?

    Again thanks for your advice (although I really hope WC lovers can update their shipping integration as well)

  • #104734
    Avatar
    aemr45
    Participant

    Hi Craig,

    Well, you can ask all technical questions to Storepep support, let me answer you with my very short experience with the plugin so far:

    1.- Store Pep is fully compatible with WC Lovers – WCFM Marketplace, you can read it in this link

    2.- You are right, I would like the process to be much easier, but it is what there is so far, I have not found a better solution.

    3.- That’s a really good question, I wish to believe that only automatic transactions send to carriers count, not virtual products etc. but this is worth asking directly to storepep support.

    I really hope WC lovers can update their shipping integration as well

    Me too, we need to wait and see what solution they offer us, and hope is a better approach.

    Thanks

  • #108403
    Avatar
    Craig
    Participant

    aemr45 – The most recent update to the plugin has added the Postal Code Range fix and it seems to be working well. I also have word back (through email support) that the shipping table structure will be fixed soon too (I’m just not sure when).

    Sushobhan – thank you so much for your attention to my initial inquiry and then for having this Postal Code Range bug fixed! It is a big relief.
    Are you able to see what the time line might be on the support ticket “Shipping zones not working with CANADA – #48647”

    Attachments:
    You must be logged in to view attached files.
  • #108744
    Avatar
    Sushobhan
    Keymaster

    Hello Craig,
    We are planning to add more muscle to our country based shipping module. As of now one can add different states and assign a shipping price for it.
    In our future release, we will introduce postcode (multiple) under states. So say under “British Columbia” you can create multiple postcode based rules and set up different shipping price for each postcode region. I think this will resolve what you want to achieve via “Zone based” shipping.
    Thanks!

You must be logged in to reply to this topic.