[ic] Small Search Box: How to ignore a field in products.txt?

mail lists at gmnet.net
Tue Aug 14 08:06:15 EDT 2007

On Mon, 2007-08-13 at 09:12 -0700, L C wrote:
> In products.txt, under prod_group, I have a group of
> items which I've labeled "database only."
> I do not want these items showing up in any search
> results.
> What do I need to add to the code below
> (small_search_box component) to have the search ignore
> any items defined as 'prod_group=database only'.  I'm
> such a nubie so I kindly ask you to be specific!  I've
> tried so many different things to no avail.
> Thanks and Blessings,
> Lisa
> ----
>       <form action="[area search]" method=post>
> 	  <input type=hidden name=mv_session_id value="[data
> session id]">
>           [set asearch]su=yes/fi=products[/set]
>       <table border="0" width="99%">
>       <tr> 
> 	    <td COLSPAN=2 align="left">
> 	      <INPUT TYPE=hidden NAME=mv_profile
> value=asearch>
> 	      <INPUT MAXLENGTH=30 NAME=mv_searchspec
> type=text size=10>
> 	      <INPUT TYPE=hidden NAME=mv_search_field
> VALUE="sku">
> 	      <INPUT TYPE=hidden NAME=mv_search_field
> VALUE="description">
>          <INPUT TYPE=hidden NAME=mv_search_field
> VALUE="featured">	      
> 	      <INPUT TYPE=hidden NAME=mv_search_field
> VALUE="comment">
>          <INPUT TYPE=hidden NAME=mv_search_field
> VALUE="sub_category">
> 	      <input type="image" alt="[L]Search Go[/L]"
> width="45" border="0" src="__THEME_IMG_DIR__go.gif">
>         </td></tr>
>     <tr><td COLSPAN=2>
> 	      <a href="[area advancedsearch]"
> class="barlink">[L]Advanced Search[/L]</a>
> 	    </td>
>       </tr>
>       </table>
>       </form>
> ----
> ____________________________________________________________________________________
> Got a little couch potato? 
> Check out fun summer activities for kids.
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users

Here is what I do.

If I understand right, there are records that you do not want to show up
in any search results.  The way I do it is not in the form at all. but
in the results page.  In the database, you should have a field with 1 or
0 as a flag something like "hide_this_record" then in the search-list
simply do a test for that field, 

something like this in the results search-region should do it:

[tmp hide_this_record][item-data products hide_this_record][/tmp]

[if !scratch hide_this_record]
    [item-data products description]...

Also, the results code that you would modify is in:

I have done these kind of modification for nla items, pending items,

More information about the interchange-users mailing list