The purpose of this request is to divide visitors to a website up by zip code. Visitors from zip code ranges considered “East?? will be routed to a page ([login to view URL]) and visitors from zip code ranges considered “West?? will be routed to a page ([login to view URL]). Visitors from a range of “Zip codes not being serviced?? (see below) will be instructed the following: “Your zip code is not within the continental United States and we do not ship to your location. You can still continue and browse our site however. Click here to continue??. (they would then click to be allowed to visit east.php.
We need a javascript created to determine if a zip code entered is within a given range of options. If it is within those options, it should route the visitor to one of two pages and set a cookie indicating that the zip code has already been entered. If an acceptable zip code has been entered and/or the cookie is present, the visitor should be automatically routed to the destination page, and bypass the [login to view URL] page.
## Deliverables
The purpose of this request is to divide visitors to a website up by zip code. Visitors from zip code ranges considered “East?? will be routed to a page ([login to view URL]) and visitors from zip code ranges considered “West?? will be routed to a page ([login to view URL]). Visitors from a range of “Zip codes not being serviced?? (see below) will be instructed the following: “Your zip code is not within the continental United States and we do not ship to your location. You can still continue and browse our site however. Click here to continue??. (they would then click to be allowed to visit east.php.
We need a javascript created to determine if a zip code entered is within a given range of options. If it is within those options, it should route the visitor to one of two pages and set a cookie indicating that the zip code has already been entered. If an acceptable zip code has been entered and/or the cookie is present, the visitor should be automatically routed to the destination page, and bypass the [login to view URL] page.
In addition, if a visitor has been directed to the specified destination page (for example: [login to view URL]), they cannot access the other page ([login to view URL]). If they were to try to access the other page ([login to view URL]), they would be unable to, and would be automatically routed back to their own page (in this example: [login to view URL]).
If a visitor were to bypass the [login to view URL] page by accessing either [login to view URL] or [login to view URL] without first visiting the [login to view URL] (and they don’t have the required cookie), a small window will be visible on the destination pages ([login to view URL] & [login to view URL]) asking them to enter their zip code. If they enter their zip code, it will automatically route them to the correct page. If they have already entered the zip code (or the zip code is present in the cookie) they would not see this small window on the destination pages. If a visitor enters a zip code from the “Zip codes not being serviced?? or an unacceptable entry, this window would show the same messages and options as described in the [login to view URL] page.
In addition to storing the cookie, once the script has determined that a visitor has entered the zip code and is in the correct destination page, a javascript variable should be set indicating their allowed destination (e.g. var zone=??west??; or var zone=??east??; or var zone=??unsupported??;). The cookie should also include the actual entered zip code value and make it available as a javascript variable (e.g. var zipcode=01001)
In addition, the zone variable and the zip code entered should be set as php session variables.
We are providing zip code ranges for dividing up the visitors. The following three zone ranges are provided: East and West and Zip Codes Not Being Serviced (see below). If visitors enter any number within the ranges listed below they will be routed to the corresponding page. These ranges represent 5 digit zip codes (only 5 digit zip codes are allowed) For example, 01001-49971 indicates a range of 5 digit zip codes starting at 01001 and including all 5 digit numbers up to 49971 and so on through all the ranges.
It at any time the visitor enters a number that is not within any of the 3 valid zip code ranges (or is not a number etc) they will be prompted that they have not entered a valid zip code and asked to retry their entry.
No other content needs to be added to the pages, and no “design?? services are required.
3 pages and the accompanying javascript and php code are required: [login to view URL], [login to view URL], [login to view URL]
East (indicates a range of numbers)
01001-49971
53001-54990
60001-62999
70001-71497
West (indicates a range of numbers)
50001-52809
55001-59937
63001-69367
71601-96898
97001-99950
Zip codes not being serviced:
00210-00988
96910- 96970