Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Support postal codes with and without spaces for Canada
- This topic has 8 replies, 3 voices, and was last updated 4 years, 10 months ago by Sushobhan.
- AuthorPosts
- January 6, 2020 at 1:48 pm #101091CraigParticipant
Hi There,
I’m not sure if this is an issue with your plugin or with WooCommerce BUT I have seen older wooCommerce forums talking about this so assumed they have fixed on their side? So perhaps it is your marketplace plugin forcing the error? I had seen a similar discussion in a Magento forum and they said they would fix so I’m assuming this issue is in the marketplace plugins?
The problem is that the shopping cart produces a shipping error dependent on if the Canadian postal code has a space in it or not and in Canada people use both variations often.
Postal Code Example : V9R 4G3 and V9R4G3
Right now V9R 4G3 works (with the space) V9R4G3 produces shipping error (without the space)
See Attached ScreenshotsCan you please review and advise?
Attachments:
You must be logged in to view attached files. - February 6, 2020 at 10:17 pm #105911WCFM ForumMember
Hi,
Do you have set postal code restrict at vendor setting?
If so, then what postal codes you have added there, show me screenshot please?
Thank You
- February 6, 2020 at 10:43 pm #105926CraigParticipant
Hi thanks for getting back to me.
The “set postal code restrict at vendor setting” is not working correctly and has been logged and is being worked on through support ticket
“Shipping zones not working with CANADA – #48647”
ALSO has been identified and discussed through this thread for that and screenshots
https://wclovers.com/forums/topic/wild-cards-for-postal-codes-shipping-zones/The issue there is Basically The postal code limiting option does not seem to work for the Vendor. I can set postal code limits at the ADMIN level and the shipping zones work but the zones don’t work when the VENDOR enters the postal code limiting from their vendor dashboard shipping settings.
BUT setting the postal code liits at the ADMIN level means those limits apply to every vendor and that is not correct. For a marketplace with many stores Each vendor should be able to set their own postal code limits.
Please see the attached email conversation with WC Lover support that has yet to be resolved.
BUT To answer your question currently the postal code matching is dependent on if there is or is not a “space” between the code and it should not be dependnat because there is no standard in Canada and everyone does it with or without space so it is causing many incorrect shopping carts.
-Vendor listed Postal Code with the space
-Customer entered postal code without a spaceCan the system be made so that the cart will see “V9R 4G3” and “V9R4G3” as the same?
Attachments:
You must be logged in to view attached files. - February 10, 2020 at 7:34 pm #106515SushobhanKeymaster
Hi,
Please check, I think you have a trailing space in “Set your postcode” field.
Thanks - February 11, 2020 at 6:33 am #106596
- February 11, 2020 at 6:35 am #106600CraigParticipant
Can you please test your system to verify if it works so that the cart will see “V9R 4G3” and “V9R4G3” as the same.
Are you able to get your system to accept the customers postal code regardless of the space with in the postal code in the vendor settings?I have been running many many many tests to confirm this “space” issue and I’m convinced it is some coding that need to happen within your plugin.
Maybe this will help:
In a previous marketplace plugin I used and had similar issue they needed to do this:
“In the file admin/class-wcvendors-shipping.php lines 824 – 878 is a function called ‘check_postcode’
Replace that function with this one:https://gist.github.com/digitalchild/ff81b9702b303ea1c13138c740b0f72a
and then some additional code was also required because the above still was not clearing out the space in the postal code:
“WooCommerce puts that space in there on the front end forms. In that same code block replace the first two lines to this
// clean both codes before doing anything to them
$customer_postcode = strtolower( str_replace( ‘ ‘, ”, $customer_postcode ) );
$rate_postcode = strtolower( str_replace( ‘ ‘, ”, $rate_postcode ) ); - February 11, 2020 at 11:59 am #106638SushobhanKeymaster
Hello,
There was a misunderstanding, I thought you are using postcode field value something like ‘V9R ‘. But now I got your point. This checking will get added in our next update.
Thanks. - February 11, 2020 at 10:00 pm #106735CraigParticipant
Hi Sushobhan,
I was using that wild card also but I can assure you I have tried many renditions and testing in trying to verify the issue.
Having the update code as you suggested will be awesome. Thanks so much for doing that!
One question – when you say next update. Which plugin are you referring to (just so I can keep an eye out for it)?
- February 12, 2020 at 5:56 pm #106844SushobhanKeymaster
Hi,
I referred to WC Multivendor Marketplace plugin. Though normally both WCFM and WCFM Marketplace receives simultaneous updates because of their interdependence.
Thanks!
- AuthorPosts
- You must be logged in to reply to this topic.