VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: UK Post Codes partial entry

UK Post Codes partial entry 22 Jun 2017 12:17 #1

I am using a simple rule to detect if a user wants a product shipped to Belfast as follows:

Name="Royal Mail Shipping to Northern Ireland"; UK_Area=="BT"; Shipping=18.00

We have had a user register and only enter a partial post code i.e. BT22 so the rule has been ignored, is there a way to force the rule to process if the user enters a partial postcode.

Thanks
The administrator has disabled public write access.

UK Post Codes partial entry 25 Jun 2017 00:26 #2

Dear Silverfox47,
You are right, ccurrently, the UK_* variables are only filled if a full, (formally) valid UK postcode is entered.
We are thinking about modifying this approach to fill the UK_ variables already if the post code starts with 1-2 letters and 1-2 digits (i.e. the start of the post code looks like it is a UK_Outward). This would be a deviation from our past approach, where the UK_ variables are only filled if a complete UK postcode was detected. We need to evaluate whether there will be any detrimental effects to other installations that depend on UK_ variables being only filled for valid UK postcodes... At first glance, I can't image that such a change would cause problems, but I'd like to think it through a little more

Changing the code would not be the big issue (we already have a prototype), but possible side-effect on existing installations are the real issue.

Anyway, if we decide to implement this, the next version will fill the UK_ variables if the first post code starts with one or two letters followed by one or two digits, even if the post code is not a complete UK post code. We'll add this to the changelog of a new release.

Best regards,
Reinhold
The administrator has disabled public write access.

UK Post Codes partial entry 29 Jun 2017 12:54 #3

Hi Reinhold,

Thanks for the response, it is rare that people only put a partial post code but it is nice if the calculation is done correctly.

I await the change in the future.

Regards

Alan
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular