Webmaster Forum
Go Back   Webmaster Forums UK SEO SEM Webmaster Community Forum - UKWW > Business Discussions > e-Commerce > Boss Cart Support Forums > Boss Cart - Old unsurpported version > Boss Cart General Support > FAQs
Register FAQ Members List Downloads Calendar Today's Posts Webmaster Resources Webmaster Blogs

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2007, 10:25 PM
Piotrek
Guest
 
Posts: n/a
iTrader: / %
Lightbulb POSTCODE problems

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
In each of the above files find this piece of code:

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;
	}
Now, there's many ways you might edit it, from allowing users to enter anything in the ZIP code, to specifying number of letters/numbers.

Example 1. Allow all:

Remove this part of code form the script.

Example 2. Allow all:

Change each
HTML Code:
return false
to
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 !!');
into:

HTML Code:
if(frm.SHIPPINGPOSTCODE1.value.length != 4 ){
		alert('Please enter 4 characters in first part of shipping postcode !!');
(first part of the ZIP must now be 4 characters)
and change this:
HTML Code:
if(frm.SHIPPINGPOSTCODE2.value.length != 3 ){
		alert('Please enter 3 characters in second part of shipping postcode !!');
to this:
HTML Code:
if(frm.SHIPPINGPOSTCODE2.value.length != 2 ){
		alert('Please enter 2 characters in second part of shipping postcode !!');
(second part of the ZIP must now be 2 characters long)

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
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
Reply

Bookmarks

Webmaster Resources
UK WW SEO Tools
Find UK Hosts
 
The Forum Rules
Forum Rules - MUST READ
 
Site Of the Month
BizzFace
Nominate site of the month
 
Tag Cloud
a75-s229 laptop ac adapter apple ipod nano 4gb brand new cellphone digital camera dj mixer drupal earphones ecommerce edible oil electronics events in india for webmasters free social hosting free web space google analytical tool hosting hosting offer low cost iphone iphone 3g 16gb iphones laptops mdj's mobile phones motorola rokr e6 newbie new pioneercdj's nokia oil phones phpld plasma tv poineer prepaid phone card prepaid phone cards proxy social web hosting telecom links template design usb cable web hosting webmasters web space for free

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


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


All times are GMT. The time now is 06:18 PM.

UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons.
Subscribe to our feeds   Subscribe to our feeds

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151