Jump to content

Can I assign a text string to a number?


lewisqic

Recommended Posts

Hi,

I am looking for someone who can help me out.  I am currently trying to modify my classifieds script, specifically the search form function page.  On my search page, customers are able to input their zip code and then specify the search radius in miles for their search. I currently have options of 10,25,50,100,200,300, and 500 miles. I would like to be able to use an option of "Any Distance" as a drop down menu where it will search within a radius of any distance. I have located the search class script that runs the search engine but I don't know how to manipulate it to make it work as i want it.  I will include the snippet of code from the search class script that I am targeting below...

 

if (strlen(trim($this->zip_filter)) != 0 && $this->zip_filter != 0 && $this->zip_filter != "0")
			{
				$smarty_settings['zip_filter'] = $this->zip_filter;
			}
		}

		$basic_distances = array(10,25,50,75,100,200,300,500);
		$tpl->assign('basic_distances',$basic_distances);
		$smarty_settings['zip_filter_distance'] = $this->zip_filter_distance;

	}

 

Is there any way that I can have the text of "Any Distance" show up for my customers in the drop down menu, and when they select "Any Distance", have it actually search within a radius of 5000 miles or so?  Any help or advice would be greatly appreciated, thank you!

 

Warm Regards,

 

Devin Lewis

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.