Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Editing Search Box


Guest

Recommended Posts

Hi, could anyone let me know how I can edit the search nox so that there is no text or box around it, all that I want to is the text box and the "go" button. Any help on editing out the rest of the search box would be great.

Regards

-Barry

Link to comment
Share on other sites

In includes/boxes/search.php, replace the second <?php ?> block with

<?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . 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) . '</form>'; ?>

Hth,

Matt

Link to comment
Share on other sites

Thank you for your help, thats worked a treat. I don't mean to be a burden but can someone please just point out which section of the code stops the box appearing? This way if someone can point it out I won't have to ask again. I would rather learn myself than have someone else do it for me. Again sorry to be a bother.

Regards

-Barry

Link to comment
Share on other sites

  • 1 year later...
In includes/boxes/search.php, replace the second <?php ?> block with
<?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . 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) . '</form>'; ?>

Hth,

Matt

 

I have been trying for days now to make the Quick search also search the descriptions on my site, I have downloaded some contributions which do the job but my search box is in the header using the same code as above.

 

it looks to me it should also be sending a variable search_in_description with a value of 1 but it appears to be behond my limited knowlede of php, does anybody know how i could include this in the code that "iiinetworks" so kindly provided ?

 

David

David

Link to comment
Share on other sites

I have been trying for days now to make the Quick search also search the descriptions on my site, I have downloaded some contributions which do the job but my search box is in the header  using the same code as above.

 

it looks to me it should also be sending a variable search_in_description with a value of 1 but it appears to be behond my limited knowlede of php, does anybody know how i could include this in the code that "iiinetworks" so kindly provided ?

 

David

 

I Just managed to get this working, for anybody else who is reading this they could try this (mainly stolen from other posts and the net but its working for me, searching both the products name and products description at the same time from a quick search that I have in my header with no box)

 

<?php
 echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
 
 echo tep_draw_input_field('keywords', BOX_HEADING_SEARCH, 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id();
  ?>
<INPUT type=hidden value=1 name=search_in_description>
 <?php
 echo tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH);
 echo '</form>';
?>

David

Link to comment
Share on other sites

  • 4 weeks later...

Archived

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

×
×
  • Create New...