- Posts: 33
- Thank you received: 2
Canada Post - Postal Code formatting breaks shipping rates
- jukeboxjunkey
-
Topic Author
- Offline
Less
More
8 years 4 months ago #292046
by jukeboxjunkey
-- url of the page with the problem -- :
www.habbyjacks.com
-- HikaShop version -- : 3.4
-- Joomla version -- : 3.8.7
When I type in a postal code like:
- V1T3K4 the shipping module works fine.
If I mistype the postal code like:
- V1T 3K3 (which is a common Canadian postal code format) then shipping indicates: Free Shipping.
How can this module be configured to accept only the one format that works?
Thanks.
-- HikaShop version -- : 3.4
-- Joomla version -- : 3.8.7
When I type in a postal code like:
- V1T3K4 the shipping module works fine.
If I mistype the postal code like:
- V1T 3K3 (which is a common Canadian postal code format) then shipping indicates: Free Shipping.
How can this module be configured to accept only the one format that works?
Thanks.
Please Log in or Create an account to join the conversation.
8 years 4 months ago #292068
by nicolas
Replied by nicolas on topic Canada Post - Postal Code formatting breaks shipping rates
Hi,
You want to edit the post code custom field via the menu Display>Custom fields and use the "regular expression check" field to restrict what can be entered as post code.
For example:
You want to edit the post code custom field via the menu Display>Custom fields and use the "regular expression check" field to restrict what can be entered as post code.
For example:
Code:
[0-9a-zA-Z]+
Please Log in or Create an account to join the conversation.
- jukeboxjunkey
-
Topic Author
- Offline
Less
More
- Posts: 33
- Thank you received: 2
8 years 4 months ago - 8 years 4 months ago #292108
by jukeboxjunkey
Replied by jukeboxjunkey on topic Canada Post - Postal Code formatting breaks shipping rates
I am using the following for my regular expression check.
(^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]?\d[ABCEGHJKLMNPRSTVWXYZ]\d$)|(^\d{5}(-\d{4})?$)
This permits Canadian Postal Codes without the space and American Postal Codes.
- If a purchaser enters an invalid postal code (ie: X1X 1X1) which is supposed to be Canada Post's format but doesn't work with the Canada Post plugin, then they receive a custom error message, however they are STILL PERMITTED to continue with the purchase which indicates Free Canada Post shipping.
It looks like I need a way to prevent the user from entering the incorrect Postal Code format at the time they are entering it, or somehow convert it to the correct format.
(^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]?\d[ABCEGHJKLMNPRSTVWXYZ]\d$)|(^\d{5}(-\d{4})?$)
This permits Canadian Postal Codes without the space and American Postal Codes.
- If a purchaser enters an invalid postal code (ie: X1X 1X1) which is supposed to be Canada Post's format but doesn't work with the Canada Post plugin, then they receive a custom error message, however they are STILL PERMITTED to continue with the purchase which indicates Free Canada Post shipping.
It looks like I need a way to prevent the user from entering the incorrect Postal Code format at the time they are entering it, or somehow convert it to the correct format.
Last edit: 8 years 4 months ago by jukeboxjunkey.
Please Log in or Create an account to join the conversation.
8 years 4 months ago #292137
by nicolas
Replied by nicolas on topic Canada Post - Postal Code formatting breaks shipping rates
Hi,
I'm not able to reproduce the issue on your website.
When I try to enter a new address with a wrong post code, the creation of the address is refused, I get an error message, and I can't go to the next step:
monosnap.com/file/UHBjbTsg4dOOXKkbWlK6tJOW3sU3mn
I'm not able to reproduce the issue on your website.
When I try to enter a new address with a wrong post code, the creation of the address is refused, I get an error message, and I can't go to the next step:
monosnap.com/file/UHBjbTsg4dOOXKkbWlK6tJOW3sU3mn
Please Log in or Create an account to join the conversation.
Time to create page: 0.177 seconds