| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
ZipCode Validation Module | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Don't worry about it! We're all guilty of asking newbie questions from time to time.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#12
|
|||||||
|
|||||||
I noticed that spaces where counted as characters with this script. ie: P0H A0 would be 6 characters. This is a problem with Canadian codes. We use 6 characters and a space (P0H 1A0). The script won't catch that error. If I type in P0H A0 the script will allow it. Is there any way to ignore the space? ie:
P0H1A0 = correct P0H 1A0 = correct P0H A0 = incorrect I hope there's a way around this? I'm obviously not smart enough to figure it out (I couldn't even find the check_zipcode_js template ) |
|||||||
#13
|
|||||||
|
|||||||
I will have to take a look at it. I can't do anything with it right now as I have more pressing matters to attend to, but I should have it worked out before the weekend is over.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#14
|
|||||||
|
|||||||
Okay, quick attempt at a fix.
Replace... Code:
...with... Code:
Let me know if this fixes it. If not, I will look at it more thoroughly tomorrow.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#15
|
|||||||
|
|||||||
NuAlpha I'm gonna' try it... but wether it works or not... YOU ROCK! http://www.goldmisers.com/smiles/thumbsup.gif
[UPDATE] Didn't work, but I've used a mod (from this forum) in my register.tpl that causes the Postal Code to display in caps and I'm wondering if it could be messing things up? Can't see it but maybe you can... here it is: Code:
|
|||||||
#16
|
|||||||
|
|||||||
It's not likely to be messing it up. Though the Canadian postal code validation code already formats the zipcode as upper case before returning the result to register.php.
I am fairly perplexed at why this is happening because the regex check should evaluate as '0' (false) if the postal code lacks the format: alphanum-space-alphanum Where I am it is nearly midnight as of this post and nothing is immediately obvious, so I will have get back to you in the morning. Anybody else care to take a stab from a fresh perspective at what could be wrong?
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#17
|
|||||||
|
|||||||
First of all, make sure you install the "check_zipcode_js.tpl" as that should notify people that their postal code is the wrong length as soon as they leave the field.
I couldn't duplicate the problem on my end but I did find a better way to write the code in any case. Here is the update... Code:
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#18
|
|||||||
|
|||||||
Thanks for all your work NuAlpha... I'm gonna' try it now.
[UPDATE] Man... I hate to tell you this because I know you've put a lot of effort into this... it still won't catch P0H 1A (missing 1 letter... should be P0H 1A0) Oh well, very valiant effort! I don't know how it could be done really??? |
|||||||
#19
|
|||||||
|
|||||||
In the file "include/register.php", directly below...
Code:
Code:
Remove the "@" symbol before the "include" and then register a test customer to see if some problem shows up in your code. Note that PHP must be set to show errors for this to work.
__________________
X-Cart Pro 4.5.5 Platinum X-Payments 1.0.6 PHP 5.3.14 MySQL 5.1.68 Apache 2.2.23 |
|||||||
#20
|
|||||||
|
|||||||
I got this error:
Code:
|
|||||||
|
|||
X-Cart forums © 2001-2020
|