Postal Code Formatting

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

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.9.18

Hello,

We are using the Canada Post Advanced plugin for shipping.

When someone enters the postal code in the following format (X0X0X0), the transaction processes correctly and includs the tax and shipping rate.

However, it is common in Canada for the postal code to use the following format (X0X 0X0) with a space between the third and forth characters. When this occurs, the order processes however the taxes and shipping are not added to the purchase.

Is there a way for the shipping plugin to accept either format? and or how can the postal code format field force a correct input?

Thanks.

Last edit: 4 years 6 months ago by jukeboxjunkey.

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

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

Further to this. It appears that we have established a regular expression check with the correct formatting, however one recent purchase had the X0X 0X0 formatted postal code. We don't know how this could have occurred as we can not re-create the use of a postal code that doesn't meet the correct version.

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

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

Further to this. I was unable to re-create the incorrect input of the postal code. So I did some digging. A couple of years ago (2018) we added the regular expression to deal with this issue, as the Canada Post plugin wouldn't function properly without the correct formatting. It appears that the issue at hand is a result of someone registering to the site using the incorrect postal code formatting prior to our regular expression configuration. That person hadn't ordered another product since the time they registered in early 2017.

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

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

Hi,

Yes, I would indeed recommend using the regular expression check to avoid the issue.
And yes, the check was only done when the address was updated/created until the 4.3.0 when we added also the check of the address being used, as you can read on our change log:

There is now a check to prevent someone from validating a checkout with an old address missing information in required custom fields that were not required when the user first entered his address.

www.hikashop.com/support/documentation/5...ashop-changelog.html
Since you have an old version of HikaShop it's normal that this user, who registered before you had added that check was able to checkout with a post code not validating the regex check.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum