View Full Version : Drop Down Menu Sort by price

Tom Mouser
06-01-2010, 04:33 AM
I would like for customers to be able to sort products by name (a-z) and price (low to high) on my product detail page. Most Shopping sites have this option. I am a little familiar with code so not a rookie. So simply just a drop down menu that would display these options:Price(High-Low), Price(Low-High),Name(A-Z),Name(Z-A). Here is some of the javascript code:
<table width="95%" border="0" cellpadding="2" cellspacing="2">
<!-- for each category -->
<tr valign="top">
<ss:foreach item="listing" within="$catalog.results">
<ss:sortby item="category"/>
<td colspan="6">
<ss:font source="$font.paragraph">
<ss:if test="$listing.category.isRootCategory()">
<ss:if test="$listing.category.photoImage">
<ss:image source="$listing.category.photoImage" alt="$listing.category.name" border="0"/><br>
<ss:value source="$listing.category.description"/><br><br>
<b><ss:value source="$listing.name"/></b></ss:font>
<!-- start count at zero for columns -->
<ss:set name="ColumnCount" value="$system.getMath(0)"/>
<!-- for each product in this category -->
<ss:foreach item="product" within="$listing.products">
<ss:sortby item="product"/>
<td align="center" valign="top">
<ss:link source="$product"><ss:image source="$product.thumbnailImage" alt="$product.name" border="0"/></ss:link>