Quote:
dynamic search feature is returning products that are hidden and disabled
|
I am a bit stumped trying to get the SQL query to lookup the 'forsale' product field. I have attached the source if you want to have a go yourself (adapt_dynamic_search_queries.php)
I have tried the following, but it doesn't seem to work...
Code:
SELECT product, image_path, forsale, 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
INNER JOIN xcart_products ON $sql_tbl[products_lng_current].productid = xcart_products.productid
WHERE product like '%".$_GET["q"]."%' AND forsale='Y'
If anyone can spot any glaring error with the above query, or has any better luck with it, please post here.