View Single Post
  #1  
Old 03-24-2009, 03:53 AM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Product Variant Searching

Hi All,

I'm developing a site that sells shoes and I'm trying to figure out if I can get a search function implemented that searches by product variant (in this case shoe size) from within a category. So while in the "mens" category you could search for size 8 via a drop-down menu and it would bring up all of the shoes in size 8 within that category.

I've already got "Search Style" (aka product) and "Search Brand" (aka manufacturer) implemented. Just needing to figure out "Search Size" in the same manner as the others.

Check it out here:

http://eternitywebdev.com/~kicks/home.php?cat=249

Here's what my code looks like for the product drop-down:

Code:
<select name="mySelect" onchange="if(this.options[this.selectedIndex].value != '')window.top.location.href=this.options[this.selectedIndex].value"> <option value="search style">Search Style</option> {section name=product loop=$products} <option value="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_p age}{if $featured eq 'Y'}&amp;featured{/if}"> {$products[product].product|truncate:30:"..":true} </option> {/section} </select>

Let me know if you have any ideas on how to do this. Thanks!
__________________
v 4.1.11, v 4.2
Reply With Quote