![]() |
Search the products descriptions
Is there a way for admins/customers to be able to search the product descriptions, and not just the product names? This is something I desperately need. Thanx for any assistance given
|
Simple answer: it does already. :lol:
$search_query = "($sql_tbl[products].product like '%$substring%' or $sql_tbl[products].descr like '%$substring%') and $sql_tbl[categories].category like '$search_category%' and $sql_tbl[products].forsale='Y' and $sql_tbl[categories].avail='Y' $price_condition "; |
what file do I plug that snippet into? the current state of the search engine is only looking through the product titles.
|
That code is from the standard x-cart distribution. I think the situation may be getting confused by the fact that there are 2 descriptions. In X-Cart, the search page looks at the product names and the short description. However, if you leave the short description blank, when you browse the site, it will use the long description. Just make sure you've got the short description filled in on all of your products.
Hope this helps! --Kurt |
then how do I change the script to look at the long description too? on many of the products, the text is too cramped in the short description field
|
ok
You might just want to put key features in short description, because if you put long description, there may be more match for search due to common words, I guess.
Mine is working fine. I sell dvds, and I put release year, actor names, director and it works fine. You might just want to make some key features like that too make search perfect. |
I sell cartoon videos, and in the full description I list the episodes that are on the tape. That way, if someone is looking for a particular episode, they can find it through a search. However, if I put the episode listing in the short description, it will be too much info listed on the category listings.
How can the code be modified to also search the fulldescr field? |
Change the search query in customer/search.php from the one I qouted above to:
Code:
$search_query = "($sql_tbl[products].product like '%$substring%' or $sql_tbl[products].descr like '%$substring%' or $sql_tbl[products].fulldescr like '%$substring%') and $sql_tbl[categories].category like '$search_category%' and $sql_tbl[products].forsale='Y' and $sql_tbl[categories].avail='Y' $price_condition "; that'll do it |
excellent. thanx
|
Hi,
Look up to following Website's Search Engine, this website is full of features :idea: Does any one know how to modify search engine just like theirs?? Try to dig in this website you will find lot and lot of features. http://www.indofilms.com/home/myfilms/language/section/catalog.jsp?BV_SessionID=@@@@0026453303.1059048867 ...hindi&main=yes |
All times are GMT -8. The time now is 03:24 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.