Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mattice's Custom Quicksearch


Guest

Recommended Posts

I'm using Custom Quicksearch & although it works fine with the search box in the body, it doesn't work for the one in my header (which wouldn't you know is the one I want to keep!)

 

The searchbox in the header will only search titles.

 

help!

Link to comment
Share on other sites

here's a piece of my HEADER.PHP code

 

NOTE: it's far from the original version, but just to give you an idea

 

I have made almost every mod optional (on/off) in my osC version,

lot's of extra coding but is still running without bugs on snapshot from today with 70+ contributions installed. (on my local box)

 

 ((ALLOW_QUICK_SEARCH_DESCRIPTION == 'true')? $param = 'true' : $param = '');

 

if (htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"])) == '')

{ $searchquery = 'enter search query'; } else { $searchquery = htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"]));}

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

 <tr class="header">

   <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', STORE_NAME) . '</a>'; ?></td>

   <td align="center" valign="bottom"><?php echo '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('')) . '#bottom') . '">' . tep_image(DIR_WS_IMAGES . 'icons/BackToBottom.gif', TEXT_BACK_TO_BOTTOM) . '</a>'; ?></td>

   <td align="right" valign="top">

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="right">

<?php

 if (SHOW_TOP_SEARCHBAR == 'true') {

?>

<tr>

<td height="40" align="right" valign="top" class="smallText"><br><form name="quick_find" method="get" action="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false);?>">

       <input type="text" name="keywords" size="30" maxlength="40" value="<?php echo $searchquery;?>" onFocus="if (this.value == 'enter search query') { this.value='' }" >

  <?php echo tep_image(DIR_WS_ICONS . 'icon_info.gif', TEXT_SEARCH_IN_DESCRIPTION) . ' ' . tep_draw_checkbox_field('search_in_description', '1', $param); ?> <?php echo tep_image_submit('search_bar.gif', BOX_HEADING_SEARCH, 'align=absmiddle');?>   

 </form>

<?php echo '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>   '; ?>

</td></tr>

<?php

}

?>

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Um, my header code looks absolutely nothing like yours Druide. :eh:

 

I've tried using the code from Mattice's search.php, which gives me a fully functioning search box in the header, but in an infobox the full width of the page.

Using the code I had before (from http://www.oscommerce.com/forums/viewtopic.php...t=search+header ) I get a search box without the infobox, but it refuses to search descriptions, only titles.

 

I don't mind if the search is in an infobox, but it needs to go to the right of my logo, & I need to get Mattice's great contribution to work with it!!!

 

Help please :tellme:

Link to comment
Share on other sites

  • 2 weeks later...

I am trying to figure out the exact same problem- did you find a solution for putting the correct search box in the header to work with Mattice's Custom Search contribution? I need it to fit into the header, to the right of the logo as well, and to search the descriptions correctly.

 

ANY help appreciated- I am about to go live and need to get this to work!

 

Thanks,

Catherine

Link to comment
Share on other sites

I got it to work by adding

<td width="<?php echo BOX_WIDTH; ?>" align="left" valign="center"><table

border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<?php include(DIR_WS_BOXES . 'search.php'); ?></table></td>

right before the

<td align=   etc

for the logo.

 

I decided to put in on the left in the end. I should think if you add it after the logo & change the align it would work ok on the right.

 

Have a look at my site if you want to see how that looks, or to peek at the code.

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...