Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

search bar only searching product title


sackling

Recommended Posts

I am having a problem where the search bar form that I created is only search the title of my products.

 

here is the code I am using to create my search form:

 

<input name="search_in_description" value="1" type="hidden">  
 <table width="150" border="0" class="searchborder">
 <form name="quick_find" method="get" action="http://www.mysite.com/catalog/advanced_search_result.php?language=en">
   <tr>
     <td><input name="keywords" class="searchinput"  type="text" style="width:135px" onFocus="if(value=='Keyword Search')value='';" value="Keyword Search" size="20" maxlength="30"></td>
     <td><input name="Go" src="../site_files/magglass.gif" align="middle" type="image"></td></form>
     </tr>
 </table>

 

I am guessing it has something to do with the search_in_description maybe?

 

any help is greatly appreciated. Thanks so much.

Link to comment
Share on other sites

I am having a problem where the search bar form that I created is only search the title of my products.

 

here is the code I am using to create my search form:

 

<input name="search_in_description" value="1" type="hidden">  
 <table width="150" border="0" class="searchborder">
 <form name="quick_find" method="get" action="http://www.mysite.com/catalog/advanced_search_result.php?language=en">
   <tr>
     <td><input name="keywords" class="searchinput"  type="text" style="width:135px" onFocus="if(value=='Keyword Search')value='';" value="Keyword Search" size="20" maxlength="30"></td>
     <td><input name="Go" src="../site_files/magglass.gif" align="middle" type="image"></td></form>
     </tr>
 </table>

 

I am guessing it has something to do with the search_in_description maybe?

 

any help is greatly appreciated. Thanks so much.

 

 

You have 2 problems:

 

1 <input name="search_in_description" value="1" type="hidden"> must occur within the form tags to work.

 

2. You must use tep_href_link for all links & forms or you may loose the session. http://www.oscommerce.com/forums/index.php?showtopic=330479&pid=1377172&start=&st=#entry1377172

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

You have 2 problems:

 

1 <input name="search_in_description" value="1" type="hidden"> must occur within the form tags to work.

 

2. You must use tep_href_link for all links & forms or you may loose the session. http://www.oscommerce.com/forums/index.php?showtopic=330479&pid=1377172&start=&st=#entry1377172

Hey Sam,

 

Thanks for the reply. I still haven't had time to figure out #2 of yours but I moved the form around correctly.

 

The problem is that even if I just type the url in:

 

http://www.mysite.com/catalog/advanced_search_result.php?keywords=test

 

It says there are no results found. But if I type in another keyword such as pants it find all the items that have pants in the title.

 

does this still have to do with tep_href?

 

Thanks again

Link to comment
Share on other sites

if u enter your query string directly, then only its contents apply, to test your form & its hidden content you must submit the form!!

 

tep_href_link is a sessions issue, nothing more, I suggest you re-read the thread. smile.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

if u enter your query string directly, then only its contents apply, to test your form & its hidden content you must submit the form!!

 

tep_href_link is a sessions issue, nothing more, I suggest you re-read the thread. smile.gif

 

Thanks so much!

 

I got it to work with your advice and someone elses post. But most of all you pointed me in the right direction as to way it was taking 2 clicks to login and complete other tasks. Thanks so much!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...