Hello,
Is it possible to Blend search results for the products together like:
Love, Tigger, WWE, Nurse
and even though they are not all on the product name or description if they have this keyword there would appear in the search results blended with the keywords,placed,above
Is that possible?
I am test an idea I have ;)
Thank you,
Michael
Hi Michael,
It would be straight forward to add a blended: search operator. Look for the following code at line 73 of search.php:
case "merchant":
...and REPLACE with:
case "blended":
$wheres = array();
$words = explode(" ",$parts[1]);
foreach($words as $word)
{
$wheres[] = "name LIKE '%".database_safe($word)."%'";
}
$where = implode(" OR ",$wheres);
$sql = "SELECT SQL_CALC_FOUND_ROWS * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants FROM `".$config_databaseTablePrefix."products` WHERE ".$where.$priceWhere." GROUP BY name";
$orderBySelection = $orderByDefault;
break;
case "merchant":
Then use without the comma separation, e.g.
blended:love tigger WWE Nurse
Cheers,
David.
--
PriceTapestry.com