![]() |
|
Home | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]() http://saveongolf.net
Hi, When I search for a term on my site, say "Ping g30 hybrid" , I get pretty good results. However when I used the sort by widget to try and put those results in order from low to high price it doesn't work. It gives me results from the entire site. Is there a way to filter search results obtained from the search bar? |
#2
|
||||
|
||||
![]() Hi,
Search results are returned in order of relevance only. Eric
__________________
![]() ![]() ![]() ![]() |
#3
|
|||
|
|||
![]() so once you have the search results you can't filter them further?...say by price?
|
#4
|
|||
|
|||
![]() If that is the case, I guess I should remove the "filter by" and "number of page results" widget on the search results page, right? Is that what makes the most sense. Right now if I get results then try to increase the number of results per page or filter them at all it gives results from the entire site. So if search results are a one shot deal, can you show me in my code below exactly what to remove? Thanks
HTML Code:
<style type="text/css">.desc img {float:left;}</style> <!-- Search Heading --> <h2>Your Search Results:</h2> <!-- /Search Heading --> <!-- Search Fields --> <ul> <?php if (@$_GET['word']){ ?><li><b>Word: </b>[store.get param="word"]</li><?php } ?> <?php if (@$_GET['merchant']){ ?><li><b>Merchant: </b>[store.get param="merchant"]</li><?php } ?> <?php if (@$_GET['tags']){ ?><li><b>Tags: </b>[store.get param="tags"]</li><?php } ?> <?php if (@$_GET['price']){ ?><li><b>Price: </b>[store.get param="price"]</li><?php } ?> </ul> <!-- /Search Fields --> <div class="dffltrs"> <form method="get"> <span class="dflside"> Products per page: <?php echo datafeedr_tools()->form_select("ppp", array( "16" => "16", "32" => "32", "56" => "56", "80" => "80", )); ?> </span> <span class="dfrside"> Sort by: <?php echo datafeedr_tools()->form_select("sort", array( "-views" => "Views (high to low)", "views" => "Views (low to high)", "sprice" => "Price (low to high)", "-sprice" => "Price (high to low)", "name" => "Product Name (a - z)", "-name" => "Product Name (z - a)", "random" => "Random", )); ?> <input type="submit" value="Go" class="dfsbmt" /> </span> <div class="clearingdiv"> </div> <?php if ( isset( $_GET['name'] ) ) { echo '<input type="hidden" name="name" value="' . $_GET['name'] . '" />'; } ?> </form> </div> <!-- Pagination Links (Top) --> <div class="pgr"> Pages: [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt=''] [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt=''] [pager.pages delim=' '] [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt=''] [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt=''] </div> <!-- /Pagination Links (Top) --> <!-- Product List --> <ul class="products grid"> <div class="pl"> [product.each] <div class="t1 col4"> <div class="bdr"> <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2> <div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div> <?php if ($product->saleprice > 0 && $product->saleprice < $product->price) { ?> <div class="prc"> <small> <span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span> <span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span> </small> </div> <?php } else { ?> <div class="prc"> <small> [product.currency mode='sign'][product.price] </small> </div> <?php } ?> <p class="desc">[product.description]</p> <div class="logo">[product.merchant_logo]</div> <div class="btns"> <?php if ( $product->compset_status > 0 ) : ?> <a href="[product.link]" class="dfbutton dforange dfmedium dfrounded" title="Find the best price for [product.name]">Compare Prices</a> <?php else : ?> <a href="[product.link]" class="dfbutton dfgreen dfmedium dfrounded" title="View details of [product.name]">Details</a> <?php endif; ?> </div> <div class="clearingdiv"> </div> </div> </div> [/product.each] <div class="clearingdiv"> </div> </div> </ul> <!-- /Product List --> <!-- Search Results --> <!-- /Search Results --> <!-- Pagination Links (Bottom) --> <div class="pgr"> Pages: [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt=''] [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt=''] [pager.pages delim=' '] [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt=''] [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt=''] </div> <!-- /Pagination Links (Bottom) --> |
#5
|
||||
|
||||
![]() Hi,
Here's the code you need: HTML Code:
<style type="text/css">.desc img {float:left;}</style> <!-- Search Heading --> <h2>Your Search Results:</h2> <!-- /Search Heading --> <!-- Search Fields --> <ul> <?php if (@$_GET['word']){ ?><li><b>Word: </b>[store.get param="word"]</li><?php } ?> <?php if (@$_GET['merchant']){ ?><li><b>Merchant: </b>[store.get param="merchant"]</li><?php } ?> <?php if (@$_GET['tags']){ ?><li><b>Tags: </b>[store.get param="tags"]</li><?php } ?> <?php if (@$_GET['price']){ ?><li><b>Price: </b>[store.get param="price"]</li><?php } ?> </ul> <!-- /Search Fields --> <!-- Pagination Links (Top) --> <div class="pgr"> Pages: [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt=''] [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt=''] [pager.pages delim=' '] [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt=''] [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt=''] </div> <!-- /Pagination Links (Top) --> <!-- Product List --> <ul class="products grid"> <div class="pl"> [product.each] <div class="t1 col4"> <div class="bdr"> <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2> <div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div> <?php if ($product->saleprice > 0 && $product->saleprice < $product->price) { ?> <div class="prc"> <small> <span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span> <span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span> </small> </div> <?php } else { ?> <div class="prc"> <small> [product.currency mode='sign'][product.price] </small> </div> <?php } ?> <p class="desc">[product.description]</p> <div class="logo">[product.merchant_logo]</div> <div class="btns"> <?php if ( $product->compset_status > 0 ) : ?> <a href="[product.link]" class="dfbutton dforange dfmedium dfrounded" title="Find the best price for [product.name]">Compare Prices</a> <?php else : ?> <a href="[product.link]" class="dfbutton dfgreen dfmedium dfrounded" title="View details of [product.name]">Details</a> <?php endif; ?> </div> <div class="clearingdiv"> </div> </div> </div> [/product.each] <div class="clearingdiv"> </div> </div> </ul> <!-- /Product List --> <!-- Pagination Links (Bottom) --> <div class="pgr"> Pages: [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt=''] [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt=''] [pager.pages delim=' '] [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt=''] [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt=''] </div> <!-- /Pagination Links (Bottom) -->
__________________
![]() ![]() ![]() ![]() |
#6
|
|||
|
|||
![]() Eric,
if I want the search bar to search the product title and not the description, how do I do that? Right now I'm getting a lot of irrelevant results mixed in. |
#7
|
|||
|
|||
![]() Do I have this set correctly to search by relevance?
|
#8
|
||||
|
||||
![]() Hi
Quote:
The sort setting is ignored on the Search page.
__________________
![]() ![]() ![]() ![]() |
#9
|
|||
|
|||
![]() Thanks Eric!
last question on this... The problem I'm having is that it is searching the description, when I need it to search just the title. (when I search for "golf bag" it returns a lot of products that do not have the word golf bag in the title) Can I make it search just the title? Nevermind. You answered this above. I misunderstood. Last edited by yankeestonk : October 31st, 2014 at 10:44 AM. Reason: nevermind |
#10
|
|||
|
|||
![]() do I change both to "name"?
|
#11
|
||||
|
||||
![]() Hi,
Almost... ![]() Eric
__________________
![]() ![]() ![]() ![]() |
#12
|
|||
|
|||
![]() Thank you.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Price In the search results | vijjus2 | Questions | 1 | August 11th, 2013 09:09 AM |
bad search results | Michaelgs | Questions | 1 | December 1st, 2012 02:16 PM |
? search results with pagination | Task001 | Questions | 2 | May 16th, 2012 03:14 PM |