Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Search description


shaamone

Recommended Posts

I'm looking to have the 'search description' tickbox on by default when using the search box, not advanced search..

 

I'm sure it's possible, even had a go myself but not sure where to start..

 

Can anyone help?

Link to comment
Share on other sites

in the catalog\includes\boxes\search.php locate this code

 

tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false)

 

change it to

 

tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'search_in_description=1', 'NONSSL', false)

Link to comment
Share on other sites

in the catalog\includes\boxes\search.php locate this code

 

tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false)

 

change it to

 

tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'search_in_description=1', 'NONSSL', false)

 

Hey, thanks for the reply :)

 

Tried that, but didn't work unfortunately..

Link to comment
Share on other sites

then you have some custom search code where you would have to post your files for someone to help

 

http://demo.oscommerce.com/advanced_search...eywords=glowing

http://demo.oscommerce.com/advanced_search...n_description=1

 

I'm pretty sure it's stock code.. I've recently built a new site from scratch using MS2

 

Here's the code

 

<?php

/*

$Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- search //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SEARCH);

 

new infoBoxHeading($info_box_contents, true, true);

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),

'align' => 'center',

'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- search_eof //-->

Link to comment
Share on other sites

ah it is a get form so I had it wrong.

 

well here it is try it:

 

<?php
/*
 $Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- search //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_SEARCH);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
						   'align' => 'center',
						   'text' => tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- search_eof //-->

 

just check with both ie and ff for the html alhough I believe should be ok.

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...