Editng Search SQL
Hi Guys,
is it possible to alter the SQL for the search feature on the homepage so it only searches through the tiltle / product name field.
Thanks in advance
Jon
Hi Guys,
is it possible to alter the SQL for the search feature on the homepage so it only searches through the tiltle / product name field.
Thanks in advance
Jon
look in the webassist/plugins/catalog folder. depending on your layout, you will need to edit the results.php pr results_grid.php files
edit the following line:
//keyword array declarations
$KeyArr1 = array("ps4_products.ProductID", "ProductSKU", "ProductName", "ProductCartDesc", "ProductShortDesc", "ProductLongDesc");
to:
//keyword array declarations
$KeyArr1 = array("ProductName", "ProductTitle");
if you wanted to remove the price range search as well, then change:
//comparison list additions
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_GET["S_ProductName"]))?$_GET["S_ProductName"]:"") ."","WHERE","Includes",",%20","%20","%22","%22",0);
$WADbSearch1->addComparison("ProductPrice","".((isset($_GET["S_ProductPrice"]))?$_GET["S_ProductPrice"]:"") ."","AND",">=",1);
$WADbSearch1->addComparison("ProductPrice","".((isset($_GET["S_ProductPrice2"]))?$_GET["S_ProductPrice2"]:"") ."","AND","<=",1);
to:
//comparison list additions
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_GET["S_ProductName"]))?$_GET["S_ProductName"]:"") ."","WHERE","Includes",",%20","%20","%22","%22",0);
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.