Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please help me sort out my catagories box on my homepage


liquidq

Recommended Posts

Posted

Hi, the catagory list box on my site is written into my header.php file, see www.liquidq.co.uk. I have a backup of the original so I can put it back if I want but would like to narrow the box down.

 

The box was too wide so I have tried narrowing it down, most of it is ok but it has lost a verticle line down the left (no code was deleted just widths altered) and the catagory links are too far over to the left.

 

here is an image of how it looks at the moment:

 

box.jpg

 

Here is the code for the box copied from my header.php file

 

<table cellspacing=0 cellpadding=0>

<tr>

<td width=197><table cellspacing=0 cellpadding=0 width=177 align=center>

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

<tr><td><div align="left"><b>Search LiquidQ.co.uk:</b></div></td></tr>

<tr><td height=2>

<div align="left">

<? // SEARCH ?>

</div>

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

<?=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" class=go') . tep_hide_session_id()?></td><td><input type=image src=images/m15.gif width=65 height=18></td></tr>

</form>

</table>

<div align="left">

<? // END SEARCH ?>

</div></td></tr>

</table>

<br /></td><td><a href="http://www.liquidq.co.uk/product_info.php?cPath=28&products_id=50"><img src=images/banner.gif width=523 height=65 border=0></a></td>

</tr>

<tr><td height=1 colspan=2></td></tr>

<tr><td height=2 colspan=2 bgcolor=#9B9B9B width=720></td></tr>

<tr><td height=4 colspan=2 bgcolor=#d9d9d9 width=720></td></tr>

<tr><td height=6 colspan=2></td></tr>

</table>

<table cellspacing=0 cellpadding=0>

<tr><td width=195 valign=top>

<table width="195" cellpadding=0 cellspacing=0>

<tr><td background=images/m200.gif width=195 height=39 class=ca valign=top style="padding-top:10px"><div align="center">BROWSE BY CATEGORIES</div></td>

</tr>

<tr><td class=bg>

<div align="center"></div>

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

<tr><td height=10></td></tr>

<?

// ---- CATEGORIES

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

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

$categories_string .= $categories_string ? '<tr><td><img src=images/m22.gif width=170 height=1 align="center"></td></tr><tr><td height=3></td></tr>' : '';

$categories_string .= '<tr><td><img src=images/m10.gif width=3 height=5 align=absmiddle> <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><tr><td height=2></td></tr>';

}else{ // SUBCATEGORY

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

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><tr><td height=2></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 width=177><div align="center"><!-- BEGIN PHP Live! code, © OSI Codes Inc. -->

 

<script language="JavaScript" src="http://www.liquidq.co.uk/phplive/js/status_image.php?base_url=http://www.liquidq.co.uk/phplive&l=muttsnuts&x=1&deptid=1&"><a href=""></a></script>

<!-- END PHP Live! code : © OSI Codes Inc. -->

</tr></td>

</table>

</tr>

<tr><td><div align="center"><img src=images/m23.gif width=195 height=10></div></td></tr>

<tr><td height=2><div align="center"></div></td></tr>

<tr><td><span class="ca"><a href=<?=tep_href_link('product_info.php','products_id=106')?>>

<div align="center"><img src=images/ADVERT.png width=195 height=82 border=0> </div>

<tr><td>

 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

 

<div align="center">

<input type="hidden" name="cmd" value="_s-xclick">

<input name="submit" type="image" src="http://www.liquidq.co.uk/images/gift2.png" border="0">

<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" target="blank" width="1" height="1">

<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH0QYJKoZIhvcNAQcEoIIHwjCCB74CAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJ

BgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA

1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC

5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBK7OZI1vUjyW2VVb4gZd34TZkcwBgbqTWT8sRdV14CeK+wYxa

HdIHHudvS8fHMAlM1b8hIqY8aXPNE6yGgsdrL/mnc4x7nBYsEHQGWhre0dPh5xBt3MmFNndCZzULHJ9jmJAkCS4lYViGifEKM0qmN3C1cyBBDYCvw/d4NdkBt5jELMAkGBSsOAwIaBQAwggFNBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECMbBBDOZMSySgIIBK

IzqOvsvmfml8Awe/g+9MqwKu5YrUHWBwh5g5GI7ozIPfWpV3v06Q9vVSDsP5FCtBAaF7m9B+sb8MHBqY5lavDJDQkG40YJoj

j9TM4z9gjC8bUywQntPndgH9uhQ24VkzcemIO/yOZ5L3WZGxXkz5I44uCVwzbvbyu6+cCCV82FeEqO0v1ER80o7fgxNGrzJxDBzjBxwMReOaPFgMFVstLt

1xBVxPCicTYqQG44ETAExrvAoEw6m6es0u5Tw/jhtVRZNFRt8sCEfvFM6XQXbBulywn+oJaXXE4ogPr3n1Az4CxsJZkJWTzg7JAbKRL1AAAmYaxPqGyJGI

Ua8StYXXJMLVyjsor4yZ4Vtwl38THtCpLsPLjVsqWoz97t0H3xAlKh/OymB4mm2oIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFB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GJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1

vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYD

VQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wG

AYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDYwNjA4MTE0NDE0WjAjBgkqhk

iG9w0BCQQxFgQUQ0Zp60uRVSjCiVyAOtZRlYLOL4QwDQYJKoZIhvcNAQEBBQAEgYBZm6+XM9NkQ1qcYdx

abjlkbS3YnSztYePCGEPxt9P+1iFlLclmvSoo9ixrlmx9jnOBmpY9RGzC5aokWHNBEUXH8Kxga25nRjyP

JtAganSAwhJ1HV+10wtLxh08C2rYCP7qxJN9DglBUxv7vBygki9+8iy12/1K+oxJDCMm+sxhLA==-----END PKCS7-----

">

</div>

</form></tr>

</table>

 

Please, please help

Archived

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

×
×
  • Create New...