Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Template Info Boxes


NettyProfessor

Recommended Posts

I have installed a new purchased template and need to change some of the boxes. Can I get some coding help? I've done minor changes...enough to know what deep trouble I can get in!! Please nurse me along because I'm very new.

 

Here is the site: www.artistoriginals.net

 

There are boxes for "currencies & choose language" in the header. I would like these to be gone completely.

 

The left column has categories and manufacturers listed. I would like to get rid of the manufacturers and change it to Information (FAQ, Contact, about, etc.)

 

Any help offered is VERY MUCH appreciated! Thanks

 

What pages do you need to see? I'll attach includes/header.php & includes/column_left.php to start:

 

HEADER.PHP

<?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

}

}

 

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

} elseif (!is_writeable(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

}

}

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

<!--

 

 

 

 

 

 

-->

 

 

 

 

 

 

 

<body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>

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

<tr><td valign=top class=bg1 align=center>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td background=images/m02.gif width=300 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=25></td></tr>

<tr><td style="padding-left: 24px"><a href=<?=tep_href_link('index.php')?>><img src=images/m03.gif width=256 height=57 border=0></a></td></tr>

</table>

</td>

<td background=images/m04.gif width=153 height=104 valign=top align=center>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td height=38></td></tr>

<tr><td class=ch1>Currencies:</td></tr>

<tr><td height=4></td></tr>

<tr><td>

<? // 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(); "class=se" style="width=110"') . $hidden_get_variables . tep_hide_session_id();

echo '</form>';

 

?>

 

 

</td></tr>

</table>

</td>

<td background=images/m05.gif width=149 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=39></td></tr>

<tr><td class=ch1 style="padding-left: 18px">Choose language:</td></tr>

<tr><td height=4></td></tr>

<tr><td style="padding-left: 18px">

<? // 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;

 

?>

 

 

</td></tr>

</table>

</td>

<td background=images/m09.gif width=146 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=45></td></tr>

<tr><td class=ch1 style="padding-left: 16px">Shopping Cart:</td></tr>

<tr><td height=5></td></tr>

<tr><td class=ch2 style="padding-left: 16px">now in your cart <a class=ml1 href=<?=tep_href_link('shopping_cart.php')?>><?=$cart->count_contents()?> items</a></td></tr>

</table>

</td></tr>

</table>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td><img src=images/m10.gif width=747 height=7></td></tr>

<tr><td><img src=images/m12.gif width=14 height=28><a href=<?=tep_href_link('index.php')?>><img src=images/b01.gif width=126 height=28 border=0></a><img src=images/m18.gif width=22 height=28><a href=<?=tep_href_link('products_new.php')?>><img src=images/b02.gif width=127 height=28 border=0></a><img src=images/m13.gif width=23 height=28><a href=<?=tep_href_link('account.php')?>><img src=images/b03.gif width=126 height=28 border=0></a><img src=images/m14.gif width=24 height=28><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/b04.gif width=127 height=28 border=0></a><img src=images/m16.gif width=21 height=28><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/b05.gif width=127 height=28 border=0></a><img src=images/m17.gif width=10 height=28></td></tr>

<tr><td><img src=images/m11.gif width=747 height=10></td></tr>

</table>

</td></tr>

<tr><td valign=top style="padding-right: 3px">

<table cellspacing=0 cellpadding=0 width=756 align=center>

<tr><td width=208 valign=top class=bg7>

<table cellspacing=0 cellpadding=0>

<tr><td background=images/m19.gif width=208 height=76 valign=top>

 

 

<? // SEARCH ?>

<table cellspacing=0 cellpadding=0>

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

 

<tr><td height=16></td></tr>

<tr><td style="padding-left: 29px" class=ch3>Quik Search:</td></tr>

<tr><td height=4></td></tr>

<tr><td width=130 style="padding-left: 29px">

 

<?=tep_draw_input_field('keywords', '', 'size="20" maxlength="50" onclick="this.value=\'\'" value="keyword" class=se2') . ' ' . tep_hide_session_id()?></td>

<td><input type=image src=images/m20.gif></td></tr>

</form>

</table>

 

<? // END SEARCH ?>

</td></tr>

<tr><td background=images/m22.gif valign=top>

<table cellspacing=0 cellpadding=0 width=208 class=bg2>

<tr><td style="padding-left: 27px">

<table cellspacing=0 cellpadding=0 width=154>

<tr><td height=58 class=ch4 style="padding-left: 32px">Products</td></tr>

 

<? // ---- CATEGORIES

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

if(!$tree[$counter]['level']){

 

$categories_string .= $categories_string ? '<tr><td background=images/m24.gif height=1></td></tr>' : '';

 

$categories_string .= '<tr><td height=22><a class=ml2 href=';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>';

// display categry name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a></td></tr>';

 

}else{ // SUBCATEGORY

 

$categories_string .= '<tr><td height=22>';

 

for($i=0;$i<$tree[$counter]['le vel'];$i++)

$categories_string .= ' ';

 

$categories_string .= ' <a class=ml2 style="font-weight:normal;" href=';

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>-';

// display category name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a></td></tr>';

}

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

 

 

 

define(TABLE_CATEGORIES, "categories");

define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if ($cPath) {

$new_path = '';

reset($cPath_array);

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

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

$categories_string .= '';

tep_show_category($first_element);

$categories_string .= '';

 

echo $categories_string;

?>

 

 

 

 

<tr><td height=20></td></tr>

</table>

</td></tr>

</table>

</td></tr>

<tr><td><img src=images/m23.gif width=208 height=21></td></tr>

<tr><td background=images/m25.gif valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td style="padding-left: 29px">

<table cellspacing=0 cellpadding=0 width=154>

<tr><td height=16></td></tr>

<tr><td class="ch6"><img src=images/m26.gif width=24 height=15 align=absmiddle> <span style="padding-left: 5px"></span>Manufacturers</td></tr>

<tr><td height=27></td></tr>

 

 

<? // ---- manufacturers

 

$manufacturers_query = tep_db_query("select distinct m.manufacturers_name, m.manufacturers_id, p.products_id from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS_INFO . " mi where p.manufacturers_id=m.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_id desc, m.manufacturers_name limit " . 5 );

if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

 

$manufacturers_array = array();

 

 

while ($manufac = tep_db_fetch_array($manufacturers_query)) {

$output_1 .= $output_1 ? '<tr><td background=images/m24.gif height=1></td></tr>' : '';

$output_1 .= '<tr><td height=22><a class=ml2 href=';

$products_name = ((strlen($manufac['manufacturers_name']) > 20) ? substr($manufac['manufacturers_name'], 0, 20) . '..' : $manufac['manufacturers_name']);

$output_1 .= tep_href_link('product_info.php', 'products_id='.$manufac['products_id']). '>'. $manufac['manufacturers_name'];

$output_1 .= '</a></td></tr>';

}

 

echo $output_1;

}

 

?>

 

 

<tr><td height=15></td></tr>

</table>

</td></tr>

</table>

</td></tr>

</table>

</td>

<td width=547 valign=top class=bg3>

<table cellspacing=0 cellpadding=0 width=547>

<tr><td width=20 valign=top><img src=images/m28.gif width=20 height=175></td>

<td width=527 valign=top>

 

COLUMN_LEFT.PHP

<?php

/*

$Id: column_left.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

$column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location');

while ($column = tep_db_fetch_array($column_query)) {

 

if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) {

define($column['cfgkey'],$column['box_heading']);

$infobox_define = $column['box_heading'];

$infobox_template = $column['box_template'];

$font_color = $column['box_heading_font_color'];

$infobox_class = $column['box_template'];

//cache control side box detect

if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) {

echo tep_cache_categories_box4();

} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) {

echo tep_cache_manufacturers_box();

} else {

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']);

}

// end cache control code

}else{

define($column['cfgkey'],$column['box_heading']);

$infobox_define = $column['box_heading'];

$infobox_template = $column['box_template'];

$font_color = $column['box_heading_font_color'];

$infobox_class = $column['box_template'];

require(DIR_WS_BOXES . $column['cfgtitle']);

 

}

}

?>

Link to comment
Share on other sites

I have installed a new purchased template and need to change some of the boxes. Can I get some coding help? I've done minor changes...enough to know what deep trouble I can get in!! Please nurse me along because I'm very new.

 

Here is the site: www.artistoriginals.net

 

There are boxes for "currencies & choose language" in the header. I would like these to be gone completely.

 

The left column has categories and manufacturers listed. I would like to get rid of the manufacturers and change it to Information (FAQ, Contact, about, etc.)

 

Any help offered is VERY MUCH appreciated! Thanks

 

What pages do you need to see? I'll attach includes/header.php & includes/column_left.php to start:

 

HEADER.PHP

<?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

}

}

 

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

} elseif (!is_writeable(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

}

}

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

<!--

 

 

-->

<body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>

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

<tr><td valign=top class=bg1 align=center>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td background=images/m02.gif width=300 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=25></td></tr>

<tr><td style="padding-left: 24px"><a href=<?=tep_href_link('index.php')?>><img src=images/m03.gif width=256 height=57 border=0></a></td></tr>

</table>

</td>

<td background=images/m04.gif width=153 height=104 valign=top align=center>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td height=38></td></tr>

<tr><td class=ch1>Currencies:</td></tr>

<tr><td height=4></td></tr>

<tr><td>

<? // 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(); "class=se" style="width=110"') . $hidden_get_variables . tep_hide_session_id();

echo '</form>';

 

?>

</td></tr>

</table>

</td>

<td background=images/m05.gif width=149 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=39></td></tr>

<tr><td class=ch1 style="padding-left: 18px">Choose language:</td></tr>

<tr><td height=4></td></tr>

<tr><td style="padding-left: 18px">

<? // 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;

 

?>

</td></tr>

</table>

</td>

<td background=images/m09.gif width=146 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=45></td></tr>

<tr><td class=ch1 style="padding-left: 16px">Shopping Cart:</td></tr>

<tr><td height=5></td></tr>

<tr><td class=ch2 style="padding-left: 16px">now in your cart <a class=ml1 href=<?=tep_href_link('shopping_cart.php')?>><?=$cart->count_contents()?> items</a></td></tr>

</table>

</td></tr>

</table>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td><img src=images/m10.gif width=747 height=7></td></tr>

<tr><td><img src=images/m12.gif width=14 height=28><a href=<?=tep_href_link('index.php')?>><img src=images/b01.gif width=126 height=28 border=0></a><img src=images/m18.gif width=22 height=28><a href=<?=tep_href_link('products_new.php')?>><img src=images/b02.gif width=127 height=28 border=0></a><img src=images/m13.gif width=23 height=28><a href=<?=tep_href_link('account.php')?>><img src=images/b03.gif width=126 height=28 border=0></a><img src=images/m14.gif width=24 height=28><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/b04.gif width=127 height=28 border=0></a><img src=images/m16.gif width=21 height=28><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/b05.gif width=127 height=28 border=0></a><img src=images/m17.gif width=10 height=28></td></tr>

<tr><td><img src=images/m11.gif width=747 height=10></td></tr>

</table>

</td></tr>

<tr><td valign=top style="padding-right: 3px">

<table cellspacing=0 cellpadding=0 width=756 align=center>

<tr><td width=208 valign=top class=bg7>

<table cellspacing=0 cellpadding=0>

<tr><td background=images/m19.gif width=208 height=76 valign=top>

<? // SEARCH ?>

<table cellspacing=0 cellpadding=0>

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

 

<tr><td height=16></td></tr>

<tr><td style="padding-left: 29px" class=ch3>Quik Search:</td></tr>

<tr><td height=4></td></tr>

<tr><td width=130 style="padding-left: 29px">

 

<?=tep_draw_input_field('keywords', '', 'size="20" maxlength="50" onclick="this.value=\'\'" value="keyword" class=se2') . ' ' . tep_hide_session_id()?></td>

<td><input type=image src=images/m20.gif></td></tr>

</form>

</table>

 

<? // END SEARCH ?>

</td></tr>

<tr><td background=images/m22.gif valign=top>

<table cellspacing=0 cellpadding=0 width=208 class=bg2>

<tr><td style="padding-left: 27px">

<table cellspacing=0 cellpadding=0 width=154>

<tr><td height=58 class=ch4 style="padding-left: 32px">Products</td></tr>

 

<? // ---- CATEGORIES

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

if(!$tree[$counter]['level']){

 

$categories_string .= $categories_string ? '<tr><td background=images/m24.gif height=1></td></tr>' : '';

 

$categories_string .= '<tr><td height=22><a class=ml2 href=';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>';

// display categry name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a></td></tr>';

 

}else{ // SUBCATEGORY

 

$categories_string .= '<tr><td height=22>';

 

for($i=0;$i<$tree[$counter]['le vel'];$i++)

$categories_string .= ' ';

 

$categories_string .= ' <a class=ml2 style="font-weight:normal;" href=';

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

$categories_string .= tep_href_link('index.php', $cPath_new) . '>-';

// display category name

$categories_string .= $tree[$counter]['name'];

$categories_string .= '</a></td></tr>';

}

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

define(TABLE_CATEGORIES, "categories");

define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if ($cPath) {

$new_path = '';

reset($cPath_array);

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

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

$categories_string .= '';

tep_show_category($first_element);

$categories_string .= '';

 

echo $categories_string;

?>

<tr><td height=20></td></tr>

</table>

</td></tr>

</table>

</td></tr>

<tr><td><img src=images/m23.gif width=208 height=21></td></tr>

<tr><td background=images/m25.gif valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td style="padding-left: 29px">

<table cellspacing=0 cellpadding=0 width=154>

<tr><td height=16></td></tr>

<tr><td class="ch6"><img src=images/m26.gif width=24 height=15 align=absmiddle> <span style="padding-left: 5px"></span>Manufacturers</td></tr>

<tr><td height=27></td></tr>

<? // ---- manufacturers

 

$manufacturers_query = tep_db_query("select distinct m.manufacturers_name, m.manufacturers_id, p.products_id from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS_INFO . " mi where p.manufacturers_id=m.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_id desc, m.manufacturers_name limit " . 5 );

if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

 

$manufacturers_array = array();

while ($manufac = tep_db_fetch_array($manufacturers_query)) {

$output_1 .= $output_1 ? '<tr><td background=images/m24.gif height=1></td></tr>' : '';

$output_1 .= '<tr><td height=22><a class=ml2 href=';

$products_name = ((strlen($manufac['manufacturers_name']) > 20) ? substr($manufac['manufacturers_name'], 0, 20) . '..' : $manufac['manufacturers_name']);

$output_1 .= tep_href_link('product_info.php', 'products_id='.$manufac['products_id']). '>'. $manufac['manufacturers_name'];

$output_1 .= '</a></td></tr>';

}

 

echo $output_1;

}

 

?>

<tr><td height=15></td></tr>

</table>

</td></tr>

</table>

</td></tr>

</table>

</td>

<td width=547 valign=top class=bg3>

<table cellspacing=0 cellpadding=0 width=547>

<tr><td width=20 valign=top><img src=images/m28.gif width=20 height=175></td>

<td width=527 valign=top>

 

COLUMN_LEFT.PHP

<?php

/*

$Id: column_left.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2002 osCommerce

 

Released under the GNU General Public License

*/

 

$column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location');

while ($column = tep_db_fetch_array($column_query)) {

 

if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) {

define($column['cfgkey'],$column['box_heading']);

$infobox_define = $column['box_heading'];

$infobox_template = $column['box_template'];

$font_color = $column['box_heading_font_color'];

$infobox_class = $column['box_template'];

//cache control side box detect

if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) {

echo tep_cache_categories_box4();

} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) {

echo tep_cache_manufacturers_box();

} else {

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']);

}

// end cache control code

}else{

define($column['cfgkey'],$column['box_heading']);

$infobox_define = $column['box_heading'];

$infobox_template = $column['box_template'];

$font_color = $column['box_heading_font_color'];

$infobox_class = $column['box_template'];

require(DIR_WS_BOXES . $column['cfgtitle']);

 

}

}

?>

Header.php

<td background=images/m04.gif width=153 height=104 valign=top align=center>

<table cellspacing=0 cellpadding=0 align=center>

<tr><td height=38></td></tr>

<tr><td class=ch1>Currencies:</td></tr>

<tr><td height=4></td></tr>

<tr><td>

<? // 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(); "class=se" style="width=110"') . $hidden_get_variables . tep_hide_session_id();

echo '</form>';

 

?>

 

 

</td></tr>

</table>

</td>

<td background=images/m05.gif width=149 height=104 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td height=39></td></tr>

<tr><td class=ch1 style="padding-left: 18px">Choose language: </td></tr>

<tr><td height=4></td></tr>

<tr><td style="padding-left: 18px">

<? // 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;

 

?>

removing the code in red should remove the boxes. you wil still have two tables there to insert stuff into.

not knowing what your background images actually look like I'm not sure if you could use them as they are to create one long table where the two blank ones will now be.

 

BACK UP THIS FILE BEFORE DOING THESE CHANGES. I CANT ENSURE THAT THIS WILL DO WHAT I THINK IT WILL.

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...