Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Autofill "search all fields" checkbox on Advance Search page?


Guest

Recommended Posts

Posted

How do I alter the html / php code to automatically have the checkbox for "search all fields" (search_in_description) checked?

 

Here's what I think is the relevant existing code from "catalog/advanced_search.php". Thanks:

 

 

$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . '' . TEXT_SEARCH_IN_DESCRIPTION);

Posted

I don't understand your question.

 

I have OSC 2.2 installed and, by default, the searches are across all categories.

 

What are you seeing with your site?

 

Here's mine...My Website

 

If you click on Advanced Search....you'll see that the search will apply to all categories within my store...unless someone selects a specific category to search in.

 

What is yours doing? Or, do I not understand what you're after?

Posted
I don't understand your question.

 

I have OSC 2.2 installed and, by default, the searches are across all categories.

 

What are you seeing with your site?

 

Here's mine...My Website

 

If you click on Advanced Search....you'll see that the search will apply to all categories within my store...unless someone selects a specific category to search in.

 

What is yours doing? Or, do I not understand what you're after?

 

 

From your site, when you go to the advanced search page, the check box for

"Search In Product Descriptions"

is not checked by default. This is the key to getting the whole advanced search to work effectively. I see that below on the same page, the "include subcategories" box IS checked by default, so I think I can look at that coding to see what's up and answer my own question. Thanks for responding anyway.

Posted
How do I alter the html / php code to automatically have the checkbox for "search all fields" (search_in_description) checked?

 

Here's what I think is the relevant existing code from "catalog/advanced_search.php". Thanks:

 

 

$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . '' . TEXT_SEARCH_IN_DESCRIPTION);

 

 

 

 

I figured it out.... all I needed to do was add a comma and the word true after the '1'

tep_draw_checkbox_field('search_in_description', '1', true)

Archived

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

×
×
  • Create New...