08 Sep 2010
Exit eSupport »
Support Center
»
Knowledgebase
»
I do not want to REQUIRE a zip code on certain tabs
Login
[Lost Password]
Email:
Password:
Remember Me:
Search
-- Entire Support Site --
Knowledgebase
Downloads
Article Options
Add Comment
Print Article
PDF Version
Email Article
Add to Favorites
I do not want to REQUIRE a zip code on certain tabs
Solution
Compatible with v3.1+ only
If you would like to 'Require' zip code searching on specific tabs, and not on others, it can be done, but there are a few modifications needing to be done to the php code and also templates.
Here's how...
1. Open the results_list.php file in a text editor. Add the following line of code to the file: (line # 92 is a good spot)
$templ->assign('whatcountry', $_REQUEST['showonly']);
2. Save the file and upload it back to your server. If your results_list.php file is encoded, then you will need to contact support for a non-encoded version.
3. Using the Template Editor Tool in your Admin Panel, open the results_list.tpl template for editing.
4. Find this section of code near the very top.... (lines # 9-11) and
DELETE IT
...
{if ($ZIP_REQUIRED_2_SEARCH eq 1) && ($entered_zip eq '')}
<div class="no_zip_entered">Zip/Postal Code field can not be blank. Please enter a zip code below to begin your search.</div>
{$SEARCH_FORM}
5. Paste the following lines of code in it's place...
{if $whatcountry eq 'US' && $ZIP_REQUIRED_2_SEARCH eq 1 && $entered_zip eq '' && $SEARCH_US_ZIP eq 1}
<div class="no_zip_entered">Zip Code field can not be blank. Please enter a zip code below to begin your search.</div>
{$SEARCH_FORM}
{elseif $whatcountry eq 'CA' && $ZIP_REQUIRED_2_SEARCH eq 1 && $entered_zip eq '' && $SEARCH_CA_ZIP eq 1}
<div class="no_zip_entered">Postal Code field can not be blank. Please enter a postal code below to begin your search.</div>
{$SEARCH_FORM}
{elseif $whatcountry eq 'INT' && $ZIP_REQUIRED_2_SEARCH eq 1 && $entered_zip eq '' && $SEARCH_INT_ZIP eq 1}
<div class="no_zip_entered">Zip/Postal Code field can not be blank. Please enter a zip/postal code below to begin your search.</div>
{$SEARCH_FORM}
6. Save the template.
Following the above steps, the system will require zip/postal code data to be entered during a serach, if that specific tab has 'Search by zip code' enabled under the 'Search Page Settings' tool.
Contact Support if you need any further assistance implementing this into your locator.
Article Details
Article ID:
79
Created On:
06 May 2010 10:33 PM
This answer was helpful
This answer was not helpful
User Comments
Add a Comment
Sharing is good. So if you have a comment about this entry please feel free to share. The Comments might be reviewed by our Staff and might require approval before being posted. Questions posted will not be answered, please submit a ticket for support requests.
Fullname:
Email: (Optional)
Comments:
Home
|
Register
|
Submit a Ticket
|
Knowledgebase
|
News
|
Downloads
Language:
English (U.S.)
Help Desk Software By Kayako eSupport v3.11.01