Canada Post - Postal Code formatting breaks shipping rates

  • Posts: 33
  • Thank you received: 2
6 years 6 months ago #292046

-- 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.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 6 months ago #292068

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:

[0-9a-zA-Z]+

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 2
6 years 6 months ago #292108

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.

Attachments:
Last edit: 6 years 6 months ago by jukeboxjunkey.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 6 months ago #292137

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum