You are here:  » Drop Down sort

Support Forum



Drop Down sort

Submitted by babyuniverse on Fri, 2009-04-17 12:53 in

Hi There,

I am interested in adding a dropdown box to the sort function, instead of the text links
"Order by Relevance, Random, Product Rating | Price Low to High, High to Low" it would be a dropdown box with those options, and also a filter on how many products are shown on each page (10, 20 or 50 etc) and the filter is action with a go button, similar to what is used on the shopzilla site at {link saved}

I beleive the following thread http://www.pricetapestry.com/node/212 was heading a similar direction.

Thanks
Richard

Submitted by support on Mon, 2009-04-20 08:16

Hi Richard,

A basic drop-down in place of the text sort-order links is straight forward, you'll find the code in this thread:

http://www.pricetapestry.com/node/1884

...i've also just modified the code in that thread to auto-submit the form if JavaScript is enabled, otherwise a "Go" button is displayed.

Changing the number of results per page is more complex, as this involves a new parameter that must be propagated throughout all the subsequent result pages, and would need adding to all the follow on links in search.php as well as html/navigation.php.

This is actually very quick for me to do whilst it would take several hundred lines to explain all the mods; so perhaps the easiest thing to do would be if you could first implement the above modification to your satisfaction, and then email me the following files:

search.php
html/navigation.php

...and i'll add the code to change the number of results per page for you...!

Cheers,
David.