Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to drag search box, language box, currency box to header


imadzweb

Recommended Posts

Hello All,

I need to give OS Commerce this type of look. http://osc2.template-help.com/zencart_14193/index.php

and i have done some thing like this so far. http://www.imadzweb.com/os

I want to drag the search box, language box and currency box to header. But the problem is that all the boxes are controlled from one css style. I just want some one to tell me how to remove css styel from these boxes.

Link to comment
Share on other sites

I want to drag the search box, language box and currency box to header.

 

well first of all include the files in search.php langauge.php and currency.php in header file. It will look like this

include(DIR_WS_BOXES . 'currencies.php'); // for currency

include(DIR_WS_BOXES . 'search.php'); // for search

include(DIR_WS_BOXES . 'languages.php'); // for lanaguage

 

Now open the file include/boxes/currencies.php and delete those programming lines and add these line.

 

<? // CURRENCIES

 

echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');

 

reset($currencies->currencies);

$currencies_array = array();

while (list($key, $value) = each($currencies->currencies)) {

$currencies_array[] = array('id' => $key, 'text' => $value['title']);

}

 

$hidden_get_variables = '';

reset($HTTP_GET_VARS);

while (list($key, $value) = each($HTTP_GET_VARS)) {

if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {

$hidden_get_variables .= tep_draw_hidden_field($key, $value);

}

}

 

echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 140"') . $hidden_get_variables . tep_hide_session_id();

echo '</form>';

 

?>

///////////currencies.php complete.

 

Now open include/boxes/search.php delete the programming and add these lines there.

 

 

<? // SEARCH ?>

<table cellspacing=0 cellpadding=0>

<?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?>

<tr><td><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" style="width: ' . (199) . 'px"') . tep_hide_session_id()?></td><td><input type=image src=images/button_quick_find.gif width=30 height=17></td></tr>

</form>

</table>

<? // END SEARCH ?>

 

///////////////////////////// For language. open include/boxes/language.php delete the programming lines and add these.

 

<? // LANGUAGES

 

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;

 

?>

 

////////////////////// Its done. I guess its quite easy :P

Link to comment
Share on other sites

I try your way to move the search box, language box and currency box to header, and it's work.

But, I allso try STSv4.5 (Simple Template System), and I think it's great.

Anyway, thanks for try to help. :thumbsup:

Link to comment
Share on other sites

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...