Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

(Basic question) How to search only in product title?


basketmen

Recommended Posts

Each time i use regular quick search, the url result is like this http://www.domain.com/catalog/advanced_sea...s=WHATEVER+HERE

 

 

its not only showing product that have WHATEVER HERE in title, but in description too

 

 

i want it only showing product that have WHATEVER HERE in title

 

 

 

how to do this guys, or where is the settings

Deadline always

Link to comment
Share on other sites

thats not default behaviour, u must have modified the code so it searches description too, just take that out

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

Thats hard coded, you will need to modify advanced_search_results to make the change

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

Basketmen,

 

I wanted to do the same thing and did! Now my PHP skill is very limited so to un-do this hard code per say here is what I did. I opened up advanced_search_results.php in dreamweaver and used the search function to find "products_description" and removed anything with that or similar. Its pretty rough but it did work for me. :) Best of luck! Back up before you go code hacking.

Link to comment
Share on other sites

  • 2 years later...

The following is what I did with osC2.3.1 so that

 

1. Quick Find would not search product descriptions and

 

2. Advanced Search would give the user the option to search descriptions:

 

Quick Find to NOT Search Product Descriptions

 

in catalog/includes/modules/boxes/bm_search.php find this:

tep_draw_hidden_field('search_in_description', '1')

 

change to this:

tep_draw_hidden_field('search_in_description', '0')

Just change the 1 to a zero to turn off the description search.

 

Advanced Search to Allow User to Choose to Search Product Descriptions

 

in catalog/advanced_search.php find this:

 

<div>
<?php echo tep_draw_input_field('keywords', '', 'style="width: 100%"') . tep_draw_hidden_field('search_in_description', '1 '); ?
</div>

 

change to this:

 

<div>
Keywords:  <?php echo tep_draw_input_field('keywords', '', 'style="width: 100%"'); ?>
<br />
Check here to search descriptions too: <?php echo tep_draw_checkbox_field('search_in_description', '1'); ?>
</div>

 

 

As always, back up first and use this information at your own risk.

 

-Jerry-

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...