If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Shipping Modules / Region Tables GB matching errors

Region Tables GB matching errors

Locked

Started by more_solutions on 4 Jul 2007, 3:35 PM · Views: 1,609

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
4 Jul 2007, 3:35 PM
#1
more_solutions avatar

more_solutions

New Zenner

Join Date:
May 2006
Posts:
23
Plugin Contributions:
0

Post #1 by more_solutions

I don't think this is me doing something wrong...

I have a courier who will deliver cheaply to postcodes starting S<number><number>, so I have that configured in one of my shipping regions.

However, today it matched a postcode starting SA<number><number>, which it shouldn't have done.

I have a relatively old beta version with lots of custom hacks, but looking at the current version the code for this area looks the same.

Therefore, and assuming I read the code correctly, specifying S will match any postcode beginning S (including SA*) rather than just postcodes starting S followed by numbers.

Is that intentional?

I have hacked my own workaround using preg_match instead of ereg (I find preg much easier to work with), that also supports a few extra postcode formats, but which has so far had about 10 mins testing so I wouldn't recommend it to anyone just yet.