osCmax v2.5 User Manual
Results 1 to 3 of 3

Header Search in Oscmax Mainpage

This is a discussion on Header Search in Oscmax Mainpage within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; OSCMAX v1.7 Has anyone successfully integrated a search in the header of the mainpage.tpl file. I have tried everything I ...

      
  1. #1
    New Member
    Join Date
    Oct 2004
    Posts
    10
    Rep Power
    0


    Default Header Search in Oscmax Mainpage

    OSCMAX v1.7
    Has anyone successfully integrated a search in the header of the mainpage.tpl file. I have tried everything I can and it just won't work. It duplicates the command button for example if you try and sign up and click continue it takes you to advanced search.

    this is as close as I have gotten.
    Code:
    <?php
    
    $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' => 'left',
    'text' => tep_draw_input_field('keywords', 'Quick Search', ' onFocus="emptyQuicksearch()" 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);
    ?>
    Problem with this is though it leaves the word "Array" at the top of the box and I have no idea where its coming from.

    thanks,

  2. #2
    Active Member
    Join Date
    May 2004
    Location
    worcester ma
    Posts
    162
    Rep Power
    0


    Default

    Have you tried just taking the include directive out of the column_left.php file and including that in the header?

    I did this a while ago and believe this was how I did it.

    Hope this helps.

  3. #3
    New Member
    Join Date
    Oct 2004
    Posts
    10
    Rep Power
    0


    Default

    Ok, I tried that I thought I did that before and got something too. What I'm getting is a 1 above the box instead of the word "Array". Here is the code from the search.php file. I'm not sure where that 1 is comming from at all. very odd.

    Code:
    <!-- search //-->
    <?php
      $boxHeading = BOX_HEADING_SEARCH;
      $corner_left = 'square';
      $corner_right = 'square';
      $boxContent_attributes = ' align="center"';
      $box_base_name = 'search'; // for easy unique box template setup (added BTSv1.2)
    
      $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)
      $boxContent = tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
      $boxContent .= tep_draw_input_field('keywords', '', 'size="25" maxlength="30" ') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH);
      $boxContent .= '</form>';
    // bof BTSv1.2
      if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) {
      // if exists, load unique box template for this box from templates/boxes/
          require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php');
      }
      else {
      // load default box template: templates/boxes/box.tpl.php
          require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX);
      }
    // eof BTSv1.2
      $boxContent_attributes = '';
    ?>
    <!-- search_eof //-->

Similar Threads

  1. Lay-out mainpage header and products
    By frie in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 11-06-2006, 11:00 AM
  2. Remove System "osCMax v2.0" from part of search r
    By torweb in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 07-24-2006, 12:59 PM
  3. Howto include the search form in the header
    By serBelenguer in forum osCommerce 2.2 Modification Help
    Replies: 5
    Last Post: 10-05-2004, 04:36 AM
  4. Move search box to header
    By eviternity in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 04-15-2004, 06:05 PM
  5. Full text search in advanced search
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-15-2004, 02:00 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
  •