HI Dave,
Is it possible to alter the search.php script how it shows the search results? What need is a php script to sort the search results on the fly as being preformed and the add take the two defined html template from /html/ "refine_price.php" and "refine_merchant.php" to generate "X" number of text links on top of the search page.
To better understand the requirement, I have created a example screenshot here: EXAMPLE PAGE
Lets say "refine_by.php" is our main sorting script. Rather than touching the original "search.php" script we can add our mods in the refine_by script. All we need to do is using php include function we can attach it to "html/search_results.php" where we want the sort filter to appear.
This refine_by.php script will look at the user's input, Let say some one is search for "samsung monitors". So this script will look for number of matching results fount Lets say "1200 Products" and Also look for Merchants Selling the product, Lets say 7 Merchants.
Now the job for this script is to first find the merchant name and list this as showm in NOTE1 (remember Merchant's Name not number of merchants) and then take the least expensive product and take most expensive product, let's say we £89 is least and £700 is most expensive product. So beark them down to increments of 100 as shown is NOTE2.
When these filters are clicked, agian this refine_by script needs work on current set of results and then disply it accordingly.
I know it's hard job but it would enhace your script so much and I am sure all users would appreciate it. I know there few threads on how to add price break filters etc but none of them actually template driven and involves in modfying the original script.
Thanks for your time.
Noor :-)
Hello Noor,
Thanks for the mock-up. I'll have a look into your requirements in more detail, but in the mean time there have been a number of threads along similar lines, the most in-depth I think being:
http://www.pricetapestry.com/node/2027
(note that the above thread discusses a drop-down box for the price range instead of links, but that's simple to change)
You'll also need the min/max price mods for this. If you don't already have that mod, email me your search.php and I'll merge the changes for you...
Cheers,
David.