Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Search the products descriptions

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-02-2003, 11:53 PM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default 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
Reply With Quote
  #2  
Old 07-03-2003, 12:42 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Simple answer: it does already.

$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 ";
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 07-03-2003, 12:47 PM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default

what file do I plug that snippet into? the current state of the search engine is only looking through the product titles.
Reply With Quote
  #4  
Old 07-03-2003, 12:57 PM
  kpayne's Avatar 
kpayne kpayne is offline
 

X-Adept
  
Join Date: Dec 2002
Location: Firetanksoftware.com
Posts: 469
 

Default

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
Reply With Quote
  #5  
Old 07-03-2003, 01:08 PM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default

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
Reply With Quote
  #6  
Old 07-04-2003, 03:46 AM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default 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.
Reply With Quote
  #7  
Old 07-04-2003, 07:53 AM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default

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?
Reply With Quote
  #8  
Old 07-04-2003, 10:08 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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
__________________
ex x-cart guru
Reply With Quote
  #9  
Old 07-04-2003, 10:21 PM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default

excellent. thanx
Reply With Quote
  #10  
Old 07-24-2003, 04:17 AM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default

Hi,
Look up to following Website's Search Engine, this website is full of features 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:32 AM.

   

 
X-Cart forums © 2001-2020