Quote:
Did anyone get anywhere with this problem? The search is also returning products that are only available for certain memberships.
|
In adapt_dynamic_search_queries.php
Replace...
Code:
$sql = "
SELECT product, image_path, concat('product.php?productid=',productid) AS link FROM $sql_tbl[products_lng_current]
INNER JOIN xcart_images_T ON $sql_tbl[products_lng_current].productid = xcart_images_T.id
WHERE product like '%".$_GET["q"]."%'
";
With...
Code:
$sql = "
SELECT p.`productid`, p.`forsale`, l.`product`, i.`image_path`, concat('product.php?productid=',p.`productid`) AS link FROM (`$sql_tbl[products]` p
INNER JOIN `$sql_tbl[products_lng_current]` l ON (p.`productid` = l.`productid`)
LEFT JOIN `$sql_tbl[images_T]` i ON p.`productid` = i.`id`)
WHERE p.`forsale` != 'N' AND product like '%".$_GET["q"]."%'
";
If your file is encoded, get in touch and I'll send you the file instead.
It won't differentiate between product memberships, you'll have to code that into the SQL query yourself.