View Single Post
Old October 8th, 2012, 03:35 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902
Default Add a category drop down menu to the Advanced Search

Here's how to add a drop down menu with your categories to the Advanced Search widget.

1. Go here: The Factory > Your Store > VIEWS > WIDGETS > Advanced Search

2. Delete the Text module that already is in the view.

3. Add a new Category list module to the view.

4. Add the following code to the Category list module:

HTML Code:
<div class="store_search_form">

	<p class="keyword"><label for="word">Keyword</label> [search.word]</p>
	<p class="merchant"><label for="merchant">Merchant</label> [search.merchant]</p>
	<p class="tag"><label for="tags">Tags</label> [search.tags]</p>
	<p class="price"><label for="price">Price</label> [search.selectprice options='any, cheap(-5), $5 - $10, $10 - $20, more than 20 (20+)']</p>
	<p class="category">
		<label for="category">Category</label> 
		<select name="c">
			[category.list before='' after='']
				<option value="[]"><?php echo str_repeat ('-', (($depth-1)*2) ); ?> &nbsp; []</option>
	<p class="button">[search.submit title='Find it!']</p>
5. Save.

After you click the [Update Settings Only] button on your site, your Advanced Search widget will now have a drop down menu containing your categories.