Results 1 to 6 of 6

Howto include the search form in the header

This is a discussion on Howto include the search form in the header within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; hello I am new with osC , and trying to customize the look and feel, wanted to have the search ...

      
  1. #1
    New Member serBelenguer's Avatar
    Join Date
    Sep 2004
    Posts
    5
    Rep Power
    0


    Default Howto include the search form in the header

    hello I am new with osC, and trying to customize the look and feel, wanted to have the search box in the header and I am lost

    I search through the community contributions, the guide, forums and haven't found any info, can anybody give me some tips on how to move the search field into the header?

    thanx,
    lin

  2. #2
    Active Member
    Join Date
    May 2003
    Posts
    148
    Rep Power
    0


    Default

    heres something that will put the cart in the header, all u need 2 do is substitute the shopping_cart.php for the search.php
    http://www.oscommerce.com/community/contributions,1350/

  3. #3
    New Member serBelenguer's Avatar
    Join Date
    Sep 2004
    Posts
    5
    Rep Power
    0


    Default

    thanx for your help Arpit, but I knew how to insert the select box into the header, what I want to do is to insert the search text field into the header navigation bar, just the search field and not the whole box ...

    I've seen many oscommerce webs have made the modifications but none has add such a contribution, I am sure it is not that complicated but as I posted before I am a bit lost ...

    I would appreciate any other suggestion, thanx in advance
    lin

  4. #4
    Active Member
    Join Date
    May 2003
    Posts
    148
    Rep Power
    0


    Default

    try this in header.php
    Code:
    <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') ?>
    <table cellspacing="0" cellpadding="0" border="0" align="left" width="100%">
    <tr>
    <td align="left" class="main"><font color="#FFFFFF"><b>Search:  </b></font><?php echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 100px"') . ' ' . tep_hide_session_id() ?>
    </td>
    <td valign="middle"><INPUT type=hidden value=1 name=search_in_description><?php echo tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) ?></td>
    <td>   </td>
    </tr>
    </table></form>

  5. #5
    New Member serBelenguer's Avatar
    Join Date
    Sep 2004
    Posts
    5
    Rep Power
    0


    Default

    very very very gracias, thanx a lot, the code you wrote didn't work out but playing around with it I got it working, now I have a simple search form as well as the three languages flags on the right side of the header navigation bar and I am more than happy, thanx again!!

    oh, by the way if anybody wants to have the search form and the 3 languages flags in the header navigation bar here goes the code I used (inside header.php):

    <td align="right" valign="middle" class="headerNavigation">

    <!-- this goes for the delect form -->
    <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') ?>
    <?php echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 100px"') . ' ' . 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) ?>
    </form>
        &nb sp;

    <!-- this code is for the languages flags links -->
    <?php
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language;
    }

    $languages_string = '';
    reset($lng->catalog_languages);
    while (list($key, $value) = each($lng->catalog_languages)) {
    $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
    };
    echo $languages_string;
    ?>

    </td>


    well, that's all, again, thanx for your help Arpit
    lin

  6. #6
    New Member serBelenguer's Avatar
    Join Date
    Sep 2004
    Posts
    5
    Rep Power
    0


    Default

    very very very gracias, thanx a lot, the code you wrote didn't work out but playing around with it I got it working, now I have a simple search form as well as the three languages flags on the right side of the header navigation bar and I am more than happy, thanx again!!

    oh, by the way if anybody wants to have the search form and the 3 languages flags in the header navigation bar here goes the code I used (inside header.php):

    Code:
    <td align="right" valign="middle" class="headerNavigation">
    
    <!-- this goes for the delect form -->
    <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') ?>
    <?php echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 100px"') . ' ' . 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) ?>
    </form>
         
    
    <!-- this code is for the languages flags links -->
    <?php
      if (!isset($lng) || (isset($lng) && !is_object($lng))) {
        include(DIR_WS_CLASSES . 'language.php');
        $lng = new language;
      }
    
      $languages_string = '';
      reset($lng->catalog_languages);
      while (list($key, $value) = each($lng->catalog_languages)) {
        $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
      };
      echo $languages_string;
    ?>
    
    </td>

    well, that's all, again, thanx for your help Arpit
    lin

Similar Threads

  1. Can not find Header.php in /catalog/include
    By chrisrex in forum osCmax v2 Installation issues
    Replies: 2
    Last Post: 09-26-2005, 04:38 PM
  2. How can I allow my search to also include category names?
    By DeltaWolf7 in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 08-11-2005, 04:24 AM
  3. Header Search in Oscmax Mainpage
    By sabre2000 in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 03-10-2005, 08:20 AM
  4. Move search box to header
    By eviternity in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 04-15-2004, 07:05 PM
  5. Change category list images, search form, add new pages.....
    By xavier_8_29_98 in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 07-24-2003, 06:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •