|
||||
|
Hello,
Many of users has complained the script only takes British ZIP codes. While we are preparing new update with this feature corrected, here's a brief guide to D.I.Y instantly :armada6: Basically we need to edit javascript validating the ZIP code, this will include changing the same thing in 4 template files: HTML Code:
/YOUR_TEMPLATE_MAIN_DIR/templates/module.register_step2.tpl /YOUR_TEMPLATE_MAIN_DIR/templates/module.register_step3.tpl /YOUR_TEMPLATE_MAIN_DIR/templates/module.userdata_update_step2.tpl /YOUR_TEMPLATE_MAIN_DIR/templates/module.userdata_update_step3.tpl HTML Code:
if(frm.SHIPPINGPOSTCODE1.value.search(/\S/)==-1){
frm.SHIPPINGPOSTCODE1.value='';
alert('Please enter first part of shipping postcode !!');
frm.SHIPPINGPOSTCODE1.focus();
return false;
}
if(frm.SHIPPINGPOSTCODE1.value.length != 3 ){
alert('Please enter 3 characters in first part of shipping postcode !!');
frm.SHIPPINGPOSTCODE1.focus();
return false;
}
if(frm.SHIPPINGPOSTCODE2.value.search(/\S/)==-1){
frm.SHIPPINGPOSTCODE2.value='';
alert('Please enter second part of shipping postcode !!');
frm.SHIPPINGPOSTCODE2.focus();
return false;
}
if(frm.SHIPPINGPOSTCODE2.value.length != 3 ){
alert('Please enter 3 characters in second part of shipping postcode !!');
frm.SHIPPINGPOSTCODE2.focus();
return false;
}
Example 1. Allow all: Remove this part of code form the script. Example 2. Allow all: Change each HTML Code:
return false HTML Code:
return true Example 3. ZIP with 4 letters/numbers in front and 2 in second part (e.g. 22AW A7) Change this: HTML Code:
if(frm.SHIPPINGPOSTCODE1.value.length != 3 ){
alert('Please enter 3 characters in first part of shipping postcode !!');
HTML Code:
if(frm.SHIPPINGPOSTCODE1.value.length != 4 ){
alert('Please enter 4 characters in first part of shipping postcode !!');
and change this: HTML Code:
if(frm.SHIPPINGPOSTCODE2.value.length != 3 ){
alert('Please enter 3 characters in second part of shipping postcode !!');
HTML Code:
if(frm.SHIPPINGPOSTCODE2.value.length != 2 ){
alert('Please enter 2 characters in second part of shipping postcode !!');
PLEASE NOTE: modifying these 4 files will only for your current template will only take effect in this template, to have it applied to other templates you need to update the adequate files in them too. The script error messages in each part of the code are pretty much descriptive so I guess you shouldn't have any problem with applying the proper settings for your site. However should you meet any problems please let me know. Best Regards, Piotrek |
![]() |
| Bookmarks |
| Webmaster Resources |
|
• UK WW SEO Tools • Find UK Hosts |
| The Forum Rules |
|
• Forum Rules - MUST READ |
| Site Of the Month |
![]() Nominate site of the month |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Postcode checker on form | lala | General Webmaster Talk | 4 | 04-26-2007 02:53 PM |
| Install Problems | king-reo-co | Boss Cart Installation Help | 3 | 06-08-2006 04:19 PM |
| Problems after installation... | sonocronic | iG Shop | 0 | 02-25-2006 01:16 PM |
| Install problems | neko | iG Shop | 1 | 12-16-2003 07:39 PM |
| UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons. |
| Subscribe to our feeds |