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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| 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 |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| 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
| ||||
| ||||
| 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
| |||
| |||
| 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: &nbsp;</b></font><?php echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 100px"') . '&nbsp;' . 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>&nbsp;&nbsp;&nbsp;</td>
</tr>
</table></form>
|
|
#5
| ||||
| ||||
| 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"') . '&nbsp;' . 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> &nbsp;&nbsp;&nbsp;&nbsp;&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
| ||||
| ||||
| 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"') . '&nbsp;' . 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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!-- 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 |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can not find Header.php in /catalog/include | chrisrex | osCMax v2 Installation issues | 2 | 09-26-2005 04:38 PM |
| How can I allow my search to also include category names? | DeltaWolf7 | osCMax v2 Customization/Mods | 0 | 08-11-2005 04:24 AM |
| Header Search in Oscmax Mainpage | sabre2000 | osCMax v1.7 Discussion | 2 | 03-10-2005 08:20 AM |
| Move search box to header | eviternity | osCMax v1.7 Discussion | 2 | 04-15-2004 07:05 PM |
| Change category list images, search form, add new pages..... | xavier_8_29_98 | osCommerce 2.2 Modification Help | 0 | 07-24-2003 06:19 PM |