View Single Post
  #177  
Old 01-29-2013, 07:30 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: X-Cart Adapt Template

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.
Attached Files
File Type: php adapt_dynamic_search_queries.php (1.8 KB, 2 views)
__________________
xcartmods.co.uk
Reply With Quote