Buy Idaho Cars

Buy Idaho Cars logo

A great way to find a car for sale in Idaho. Uses Ubercart, and Apache SOLR. Making it easy for people to find the car their looking for.

Ubercart with the uc_recurring module is used to handle the magic of recurring payments from Dealerships in the area.

0
Average: 5 (2 votes)
James Peck's picture
Offline
Joined: 10/20/2010
Juice: 51
Search

Very nice drupal site!

How did you get the search results to display so nicely - when I use apachesolr I just get a mess care of the "search snippet"?

eg...

http://www.buyidahocars.com/search/apachesolr_search/automobile?solrsort...

Very impressed!

Cheers
James

bartonseo's picture
Offline
Joined: 02/09/2011
Juice: 24
Thanks James! Have you tried

Thanks James!

Have you tried modifying these two files?

search-results.tpl.php
search-result.tpl.php

Most of the work for that page was done in the search-result.tpl.php file. It's just like any other template, but you'll want to add this

/**
* function for pulling out the necessary variables in the search results to display thumbnails images alongside the search results
*/
function hook_preprocess_search_result(&$vars, $hook) {
  $n = node_load($vars['result']['node']->nid);
  $n && ($vars['node'] = $n);
}

to your template file so that images can be displayed within the template. I think I ended up deleting the line about the snippet. It wasn't very helpful when you want a custom solution.