Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

coolMenu


Keyser Soze

Recommended Posts

Ok went though all 54 pages still does not tell me if i need to add the 3 lines to everypage even if there is not a body tag

Hi Keith,

 

only pages with a body tag and only in the catalog directory.

 

only pages that actually are a real shop page that have things like 'include application_top.php' and 'include column_left.php' and 'include header.php'- go through each of your catalog pages and forget ones that are pure php with no html and other ones like popup pages which dont include these other files (usually short files). There are still a lot of files to change though !

Regards

Mark Brindle

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

thanks for the response. Since i was using sts i went and started with a fresh install got the menu up not really working but it's just not showing the categories so will go back threw these pages i think i saw something that was talking about the menu being blank, added the sts and now gonna go back and figure out why it's not showing the info in the menu Thanks A bunch for your help

Link to comment
Share on other sites

Well i thought i had cracked the menu problem using a relative DIV, but just noticed another issue this brings me in IE and shows up as a javascript error in Netscape. Error shows that first menu item cannot be clicked and the menu top line then disappears !

 

Just been experimenting and tried using a named image tag instead of a div as i thought this was better supported in browsers, and got it working again.

Phew !

 

Changed my includes\boxes\coolmenu.php to use two images as i found another problem having just the one named image on its own created. The size of the image would mess up the menu rendering again so set it to zero - its only a coordinate placeholder now which sits in the new category box in the right position.

 

So i have one transparent image with zero width and height named 'menuloc1' - this is the placeholder name i pass to the new js script which gets the correct xy coordinates. then i have a second image under that with no name to pad out the space - cannot seem to get it to use $height anymore (not sure why but dont care at this moment) so i fix the height of this second transparent image to avoid the menu from dropping over the other boxes.

 

so my boxes\coolmenu.php has the following now:

 

 

  $info_box_contents[] = array('text'  => '<img src="images/trans.gif" width="0" height="0" name="menuloc1"><br><img src="images/trans.gif" width="146" height="35" >');

 

And it all seems to work again (until the next problme i havent spotted yet!)

Regards

Mark Brindle

Link to comment
Share on other sites

Maniac, I can't seem to find anything on the inside of coll menu being blank except not to install it the way the directions say and install like dlj or some guy like that says. I am using STS 2.1and cool menu 1.2 have any idea why it is not showing information in the menu. I made sure nothing had " ' " in the titles. Any other clue

Link to comment
Share on other sites

Hi

post a link if you want.

 

I have not got STS but i have a very modifed site and had to install differently then the normal method.

Do you get anything showing ? Do you get a menu at all ? or just nothing in the menu ?

 

May be useful to post up say index.php - the normal install is to have the script include in the head, then have the coomenu.php include just after the <body> tag.

Did you modify the boxes\coolmenu file ?

 

I find it better to test with Netscape 7 which has a javascript console (under tools) to see javascript error messages that IE doesnt show you...may help isolate whats happening a bit.

 

Problems i had related to my trying to get the menu location x,y coordinates and when the javascript failed i wouldnt get a menu at all, so i started doing alert messages to show variables in the code - if an alert box didnt show, then the code hadnt got that far so id move back a bit till i found the offending areas

 

you can do alert('hello') or alert('x='x) type messages in the javascript (more so in includes\coolmenu.php and includes\boxes\coolmenu.php rather then in the coolmenu.js (menu-animation.js).

might help you find where its going wrong

Regards

Mark Brindle

Link to comment
Share on other sites

Thanks for the quick reply. I installed the files like they said everything in my web page loads even the menu loads there is just nothing inside the menu. I did not modify the /boxes/cool menu file i guess i'm not sure what i am suppose to do to that.

 

Index.php

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT>

</head>

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

 

<!-- coolMenu //-->

<?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?>

<!-- coolMenu_eof //-->

 

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<?php

if ($category_depth == 'nested') {

$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

$category = tep_db_fetch_array($category_query);

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<?php

if (isset($cPath) && strpos('_', $cPath)) {

// check to see if there are deeper categories within the current category

$category_links = array_reverse($cPath_array);

for($i=0, $n=sizeof($category_links); $i<$n; $i++) {

$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");

$categories = tep_db_fetch_array($categories_query);

if ($categories['total'] < 1) {

// do nothing, go through the loop

} else {

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

break; // we've found the deepest category the customer is in

}

}

} else {

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

}

 

$number_of_categories = tep_db_num_rows($categories_query);

 

$rows = 0;

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

$rows++;

$cPath_new = tep_get_path($categories['categories_id']);

$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";

if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {

echo ' </tr>' . "\n";

echo ' <tr>' . "\n";

}

}

 

// needed for the new products module shown below

$new_products_category_id = $current_category_id;

?>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

</tr>

</table></td>

</tr>

</table></td>

<?php

} elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {

// create column list

$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,

'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,

'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,

'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,

'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

asort($define_list);

 

$column_list = array();

reset($define_list);

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

if ($value > 0) $column_list[] = $key;

}

 

$select_column_list = '';

 

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

switch ($column_list[$i]) {

case 'PRODUCT_LIST_MODEL':

$select_column_list .= 'p.products_model, ';

break;

case 'PRODUCT_LIST_NAME':

$select_column_list .= 'pd.products_name, ';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$select_column_list .= 'm.manufacturers_name, ';

break;

case 'PRODUCT_LIST_QUANTITY':

$select_column_list .= 'p.products_quantity, ';

break;

case 'PRODUCT_LIST_IMAGE':

$select_column_list .= 'p.products_image, ';

break;

case 'PRODUCT_LIST_WEIGHT':

$select_column_list .= 'p.products_weight, ';

break;

}

}

 

// show the products of a specified manufacturer

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

// We are asked to show only a specific category

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";

} else {

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

}

} else {

// show the products in a given categorie

if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

// We are asked to show only specific catgeory

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

} else {

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

}

}

 

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

if ($column_list[$i] == 'PRODUCT_LIST_NAME') {

$HTTP_GET_VARS['sort'] = $i+1 . 'a';

$listing_sql .= " order by pd.products_name";

break;

}

}

} else {

$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);

$sort_order = substr($HTTP_GET_VARS['sort'], 1);

$listing_sql .= ' order by ';

switch ($column_list[$sort_col-1]) {

case 'PRODUCT_LIST_MODEL':

$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_NAME':

$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');

break;

case 'PRODUCT_LIST_MANUFACTURER':

$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_QUANTITY':

$listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_IMAGE':

$listing_sql .= "pd.products_name";

break;

case 'PRODUCT_LIST_WEIGHT':

$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_PRICE':

$listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

}

}

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<?php

// optional Product List Filter

if (PRODUCT_LIST_FILTER > 0) {

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";

} else {

$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";

}

$filterlist_query = tep_db_query($filterlist_sql);

if (tep_db_num_rows($filterlist_query) > 1) {

echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);

$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));

} else {

echo tep_draw_hidden_field('cPath', $cPath);

$options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));

}

echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);

while ($filterlist = tep_db_fetch_array($filterlist_query)) {

$options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);

}

echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');

echo '</form></td>' . "\n";

}

}

 

// Get the right image for the top-right

$image = DIR_WS_IMAGES . 'table_background_list.gif';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$image = tep_db_fetch_array($image);

$image = $image['manufacturers_image'];

} elseif ($current_category_id) {

$image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$image = tep_db_fetch_array($image);

$image = $image['categories_image'];

}

?>

<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>

</tr>

</table></td>

<?php

} else { // default page

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="main"><?php echo tep_customer_greeting(); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_MAIN; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

<?php

include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

?>

</table></td>

</tr>

</table></td>

<?php

}

?>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

did you have the .js files uploaded to the correct location?

 

FYI make sure when you post code you wrap it in

 tags. It makes it easier for those trying to help read it.
Edited by Silverado05

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

ok that doesnt help much. The script is in the right place in the head and so is the include coolmenu.

 

perhaps a copy of the 'view source' of this index page when its on a browser will help instead.

 

you should see stuff like:

 

 

oCMenu.makeMenu('top_1','',category1','http://your-url.com/producturl.html')

oCMenu.makeMenu('sub_1_1','top_1','subcategory1name','http://your-url.com/subcat.html')

 

(your site may use index.php?cid= instead of .html - i use seo contrib and that makes the links point to html pages instead.)

 

there should be a ocMenu.makeMenu(xxx) for each category - the top_1 for top level, then sub_1_1, Top_1 means subcategory 1 of top menu 1 etc. You will have top_2 and top_3 for next top level categories

 

This is the bit of javascript that is created by the includes\boxes\coolmenu.php after it parses the category table in the database and makes lots of items which pass to the includes\coolmenu.php to then display them in the menu.

 

The original dhtml code was designed for hardcoded menus and has not been modified - all thats being done if some work to make these 'oCMenu.makeMenu' strings correctly formatted to make tehmenu system.

So you may have some problem with formatting of these strings based on your template.

Regards

Mark Brindle

Link to comment
Share on other sites

did you have the .js files uploaded to the correct location?

 

FYI make sure when you post code you wrap it in

 tags. It makes it easier for those trying to help read it.

 

Sorry about the code , I loaded the js file in the includes menu. One thing i did notice is the version i am using does not have the extra file that goes into classes it is another box.php file it is not on the original load file that i downloaded first. Do i need to load that. I'm lost as far as showing the info..

Link to comment
Share on other sites

Sorry about the code , I loaded the js file in the includes menu. One thing i did notice is the version i am using does not have the extra file that goes into classes it is another box.php file it is not on the original load file that i downloaded first. Do i need to load that. I'm lost as far as showing the info..

 

 

I meant just right click and 'view source' when the page is in a browser - you will see the page html and javascript minus any php code. Most of this contrib is relating to javascript issues rather then php issues. if you cut and past that here (in code braces!) too.

 

you should have \include\boxes\coolmenu.php uploaded too.

This is referenced in your \includes\column_left.php file and is included instead of the standard boxes\categories.php file.

 

You could post the boxes\coolmenu.php file you are using too.

Regards

Mark Brindle

Link to comment
Share on other sites

I meant just right click and 'view source' when the page is in a browser - you will see the page html and javascript minus any php code. Most of this contrib is relating to javascript issues rather then php issues. if you cut and past that here (in code braces!) too.

 

you should have \include\boxes\coolmenu.php uploaded too.

This is referenced in your \includes\column_left.php file and is included instead of the standard boxes\categories.php file.

 

You could post the boxes\coolmenu.php file you are using too.

 

Index.php

<!-- Page layout by Simple Template System (STS) v2.01 on osCommerce 2.2-MS2 - http://www.diamondsea.com/sts/ -->
<!-- Using Template File [includes/sts_template.html) -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>osCommerce</title><base href="http://127.0.0.1/home/oscommerce/catalog/">

<!-- start get_javascript(applicationtop2header) //-->
<script>

	oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

	//Menu properties
	oCMenu.pxBetween=0
	oCMenu.fromLeft=10
	oCMenu.fromTop=100
	oCMenu.rows=0
	oCMenu.menuPlacement="left"

	oCMenu.offlineRoot=""
	oCMenu.onlineRoot=""
	oCMenu.resizeCheck=1
	oCMenu.wait=500
	oCMenu.fillImg="cm_fill.gif"
	oCMenu.zIndex=0

	//Background bar properties
	oCMenu.useBar=1
	oCMenu.barWidth="menu"
	oCMenu.barHeight="menu"
	oCMenu.barClass="clBar"
	oCMenu.barX="menu"
	oCMenu.barY="menu"
	oCMenu.barBorderX=0
	oCMenu.barBorderY=0
	oCMenu.barBorderClass=""

	oCMenu.level[0]=new cm_makeLevel()
	oCMenu.level[0].width=150
	oCMenu.level[0].height=28
	oCMenu.level[0].regClass="clLevel0"
	oCMenu.level[0].overClass="clLevel0over"
	oCMenu.level[0].borderX=1
	oCMenu.level[0].borderY=1
	oCMenu.level[0].borderClass="clLevel0border"
	oCMenu.level[0].offsetX=0
	oCMenu.level[0].offsetY=0
	oCMenu.level[0].rows=0
	oCMenu.level[0].arrow="images/arrow.gif"
	oCMenu.level[0].arrowWidth=11
	oCMenu.level[0].arrowHeight=11
	oCMenu.level[0].align="right"
	oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.8)"

		oCMenu.level[1]=new cm_makeLevel()
		oCMenu.level[1].width=250
		oCMenu.level[1].height=14
		oCMenu.level[1].regClass="clLevel1"
		oCMenu.level[1].overClass="clLevel1over"
		oCMenu.level[1].borderX=1
		oCMenu.level[1].borderY=1
		oCMenu.level[1].align="right"
		oCMenu.level[1].offsetX=0
		oCMenu.level[1].offsetY=0
		oCMenu.level[1].borderClass="clLevel1border"
		oCMenu.level[1].align="right"
		oCMenu.level[1].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.6)"



		oCMenu.level[2]=new cm_makeLevel()
		oCMenu.level[2].width=250
		oCMenu.level[2].height=14
		oCMenu.level[2].regClass="clLevel1"
		oCMenu.level[2].overClass="clLevel1over"
		oCMenu.level[2].borderX=1
		oCMenu.level[2].borderY=1
		oCMenu.level[2].align="right"
		oCMenu.level[2].offsetX=0
		oCMenu.level[2].offsetY=0
		oCMenu.level[2].borderClass="clLevel1border"
		oCMenu.level[2].align="right"
		oCMenu.level[2].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.6)"



		oCMenu.level[3]=new cm_makeLevel()
		oCMenu.level[3].width=250
		oCMenu.level[3].height=14
		oCMenu.level[3].regClass="clLevel1"
		oCMenu.level[3].overClass="clLevel1over"
		oCMenu.level[3].borderX=1
		oCMenu.level[3].borderY=1
		oCMenu.level[3].align="right"
		oCMenu.level[3].offsetX=0
		oCMenu.level[3].offsetY=0
		oCMenu.level[3].borderClass="clLevel1border"
		oCMenu.level[3].align="right"
		oCMenu.level[3].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.6)"


	oCMenu.makeMenu('top_1','','Hardware','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1')
oCMenu.makeMenu('sub_1_1','top_1','CDROM Drives','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_17')
oCMenu.makeMenu('sub_1_2','top_1','Graphics Cards','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_4')
oCMenu.makeMenu('sub_1_3','top_1','Keyboards','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_8')
oCMenu.makeMenu('sub_1_4','top_1','Memory','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_16')
oCMenu.makeMenu('sub_1_5','top_1','Mice','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_9')
oCMenu.makeMenu('sub_1_6','top_1','Monitors','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_6')
oCMenu.makeMenu('sub_1_7','top_1','Printers','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_5')
oCMenu.makeMenu('sub_1_8','top_1','Speakers','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=1_7')
oCMenu.makeMenu('top_2','','Software','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=2')
oCMenu.makeMenu('sub_2_1','top_2','Action','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=2_19')
oCMenu.makeMenu('sub_2_2','top_2','Simulation','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=2_18')
oCMenu.makeMenu('sub_2_3','top_2','Strategy','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=2_20')
oCMenu.makeMenu('top_3','','DVD Movies','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3')
oCMenu.makeMenu('sub_3_1','top_3','Action','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3_10')
oCMenu.makeMenu('sub_3_2','top_3','Cartoons','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3_13')
oCMenu.makeMenu('sub_3_3','top_3','Comedy','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3_12')
oCMenu.makeMenu('sub_3_4','top_3','Drama','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3_15')
oCMenu.makeMenu('sub_3_5','top_3','Science Fiction','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3_11')
oCMenu.makeMenu('sub_3_6','top_3','Thriller','http://127.0.0.1/home/oscommerce/catalog/index.php?cPath=3_14')


	// create menu
	oCMenu.construct()

	  <!-- 	Copyright 2002 www.dhtmlcentral.com  --  modified for PHP and osCommerce by Andreas Kothe - www.oddbyte.de	-->

	</SCRIPT><!-- coolMenu_eof //-->

<!-- header //-->

<!-- end get_javascript(applicationtop2header) //-->

<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<table width="779" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr class="header"> 
<td width="25%" rowspan="3" align="left" valign="top"><font size="1" face="Arial, Helvetica, sans-serif"> 
  <a href="http://127.0.0.1/home/oscommerce/catalog/index.php"><img src="images/paws4fun_leftheader.jpg" border="0" alt="Paws 4 Fun" title=" Paws 4 Fun " width="473" height="106"></a></font></td>
<td height="27" align="left" valign="top" nowrap><font size="1" face="Arial, Helvetica, sans-serif"><a href="http://127.0.0.1/home/oscommerce/catalog/account.php"><img src="images/paws4fun_account.jpg" border="0" alt="My Account" title=" My Account " width="99" height="50"></a></font> 
</td>
<td height="27" colspan="2" align="left" valign="top" nowrap><div align="left"><font size="1" face="Arial, Helvetica, sans-serif"> 
	</font></div>
  <font size="1" face="Arial, Helvetica, sans-serif"><a href="http://127.0.0.1/home/oscommerce/catalog/shopping_cart.php"><img src="images/paws4fun_cart.jpg" border="0" alt="Cart Contents" title=" Cart Contents " width="110" height="50"></a></font> </td>
<td width="14%" rowspan="2" align="left" valign="top" nowrap><font size="1" face="Arial, Helvetica, sans-serif"><a href="http://127.0.0.1/home/oscommerce/catalog/checkout_shipping.php"><img src="images/paws4fun_checkout.jpg" border="0" alt="Checkout" title=" Checkout " width="98" height="58"></a></font> 
  <div align="left"><font size="1" face="Arial, Helvetica, sans-serif"> </font></div></td>
 </tr>
 <tr class="header"> 
<td colspan="3" align="left" valign="top" nowrap><div align="left"> </div>
  <div align="left"></div>
  <div align="left"></div></td>
 </tr>
 <tr class="header"> 
<td colspan="2" rowspan="2" align="left" valign="middle"><div align="left"></div></td>
<td rowspan="2">?</td>
<td><font size="1" face="Arial, Helvetica, sans-serif">
<!-- start searchbox //-->
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<form name="quick_find" action="http://127.0.0.1/home/oscommerce/catalog/advanced_search_result.php" method="get">
 <tr>
<td align="center" class="plainBox"><input type="text" name="keywords" size="10" maxlength="30" style="width: 75px">?<br><a href="http://127.0.0.1/home/oscommerce/catalog/advanced_search.php"><b>Advanced Search</b></a></td>
 </tr>
</form>
</table>
<!-- end searchbox //-->
</font></td>
 </tr>
 <tr class="header"> 
<td width="25%" align="left" valign="top"><font size="1" face="Arial, Helvetica, sans-serif"><a href="http://127.0.0.1" class="headerNavigation">Top</a> ? <a href="http://127.0.0.1/home/oscommerce/catalog/index.php" class="headerNavigation">Catalog</a></font></td>
<td><div align="left"></div></td>
 </tr>
</table>
<table width="50%" border="0" align="center">
 <tr>
<td width="75%">?</td>
<td width="25%"><font size="1" face="Arial, Helvetica, sans-serif">
<!-- start categorybox //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td>
<td width="100%" height="14" class="infoBoxHeading">coolMenu</td>
<td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
 <tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
 <tr>
<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
 <tr>
<td class="boxText">
<img src="images/trans.gif" width="150" height="53"></td>
 </tr>
 <tr>
<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
</table>
</td>
 </tr>
</table>
<!-- end categorybox //-->
</font></td>
 </tr>
</table>
<font size="1" face="Arial, Helvetica, sans-serif"><br>
</font> <font size="1" face="Arial, Helvetica, sans-serif"><br>
</font> 
<table width="62%" border="1" align="center" cellpadding="0" cellspacing="0">
 <tr> 
<td align="center" valign="top"> <p>
<!-- start content //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading">What's New Here?</td>
		<td class="pageHeading" align="right"><img src="images/table_background_default.gif" border="0" alt="What's New Here?" title=" What's New Here? " width="1.425" height="1"></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="main">Welcome <span class="greetUser">Guest!</span> Would you like to <a href="http://127.0.0.1/home/oscommerce/catalog/login.php"><u>log yourself in</u></a>? Or would you prefer to <a href="http://127.0.0.1/home/oscommerce/catalog/create_account.php"><u>create an account</u></a>?</td>
	  </tr>
	  <tr>
		<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
	  </tr>
	  <tr>
		<td class="main">This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"><img src="images/default/1.gif" border="0" alt="" width="20" height="20"></td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top"><img src="images/default/2.gif" border="0" alt="" width="20" height="20"></td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/english/index.php</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->English->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define('TEXT_MAIN', '<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define('TEXT_MAIN', '');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top"><img src="images/default/3.gif" border="0" alt="" width="20" height="20"></td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top"><img src="images/default/4.gif" border="0" alt="" width="20" height="20"></td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://www.oscommerce.info" target="_blank"><u>osCommerce Knowledge Base</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>osCommerce 2.2-MS2</b></font>.</td>
	  </tr>
	  <tr>
		<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
	  </tr>

	</table></td>
  </tr>
</table>
<!-- end content //-->
</p>
  <p>?</p>
  <p>?</p>
  <p>?</p>
  <p>?</p>
  <p>?</p>
  <p align="center">?</p></td>
 </tr>
</table>
<br>
<table width="62%" border="1" align="center" cellpadding="3" cellspacing="0">
 <tr> 
<td><div align="center"><font size="1" face="Arial, Helvetica, sans-serif"><table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td align="middle" class="footer">??Sunday 12 March, 2006??</td>

 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText">
</td>
 </tr>
</table>
</font></div></td>
 </tr>
</table>
<font size="1" face="Arial, Helvetica, sans-serif"><br>
</font> <font size="1" face="Arial, Helvetica, sans-serif"><br>
</font> 
<p>?</p>
</body>
</html>

 

 

coolmenu.php

 

<?php
/* ------------------------------------------------

 coolMenu for osCommerce

 author:	Andreas Kothe 
 url:		http://www.oddbyte.de


 Released under the GNU General Public License

 ------------------------------------------------ 
*/

?>
<!-- coolMenu //-->

<!-- copyright 2003 Andreas Kothe - www.oddbyte.de // -->

  <TR>
	<TD>

<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
			   'text'  => 'coolMenu'
			  );
 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
 } else {
$cat_choose = '';
 }



 $info_box_contents[] = array('text'  => '
<img src="images/trans.gif" width="150" height="' . $height . '">');


 new infoBox($info_box_contents);

?>
	</TD>
  </TR>

<!-- coolMenu_eof //-->

Link to comment
Share on other sites

Ok the last file you posted isn't complete. Is that all you have or did the forum cut it short? If that is all you have then you need to re-upload that file as it looks like it upload correctly.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

ok downloaded that file again and installed it. Wow the page just went haywire I am fixing to have a link i am almost done uploading so you can see. here is the new installed . coolmenu.php

 

<?php
/* ------------------------------------------------

 coolMenu for osCommerce

 author:	Andreas Kothe 
 url:		http://www.oddbyte.de
 copyright: 2003 Andreas Kothe
 modified: 2003-07-28 Marc Zacher

 extended to work for javascript enanbled and disabled
 with javascript disabled, the conventional categories box is shown
 this extension is provided by Marc Zacher

 The copyright notice of Andreas Kothe in the html output
 has been removed and put in this header
 since it would cause problems in javascript context.

 Released under the GNU General Public License

 ------------------------------------------------ 
*/

?>
<script type="text/javascript">
<!--
document.write(" <TR> <TD> ");
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
			   'text'  => BOX_HEADING_CATEGORIES
			  );
 $coolmenuinfoboxheading = new infoBoxHeading($info_box_contents, true, false, false, false);
 $output_string = $coolmenuinfoboxheading->table_string;


 $info_box_contents = array();
 if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
 } else {
$cat_choose = '';
 }



 $info_box_contents[] = array('text'  => '
<img src="images/trans.gif" width="150" height="' . $height . '">');

 $coolmenuinfobox = new infoBox($info_box_contents, false);
 $output_string .= $coolmenuinfobox->table_string;
 //remove all html commments
 $output_string = preg_replace("/<!--.*?-->/", "", $output_string);
 //escape all occurences of "
 $output_string = preg_replace('/"/', '\"', $output_string);
 //escape all occurences of /
 $output_string = preg_replace('/\//', '\/', $output_string);
 //remove trailing \n
 $output_string = preg_replace('/\\n+$/', '', $output_string);
 //replace all \n with ");\ndocument.write("
 $output_string = preg_replace('/\\n/', "\");\ndocument.write(\"", $output_string); 
 //prepend document.write at the beginning and append ");\n
 $output_string = "document.write(\"" . $output_string . "\");\n";
 echo $output_string;
?>
document.write(" <\/TD> <\/TR> ");
//--> </script>
<noscript>
<?php
 include(DIR_WS_BOXES . 'categories.php');
?>
</noscript>

 

This time it didn't show the menu at all and this stuff was in place of the data on the page

 

<\/td>"); document.write(" <\/tr>"); document.write("<\/table>"); document.write(""); document.write(" "); document.write("

Link to comment
Share on other sites

I think I might have found your problem, try this.

 

<?php
/* ------------------------------------------------

 coolMenu for osCommerce

 author:	Andreas Kothe 
 url:		http://www.oddbyte.de
 copyright: 2003 Andreas Kothe
 modified: 2003-07-28 Marc Zacher

 extended to work for javascript enanbled and disabled
 with javascript disabled, the conventional categories box is shown
 this extension is provided by Marc Zacher

 The copyright notice of Andreas Kothe in the html output
 has been removed and put in this header
 since it would cause problems in javascript context.

 Released under the GNU General Public License

 ------------------------------------------------ 
*/

?>
<script type="text/javascript">
<!--
document.write(" <TR> <TD> ");
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
			   'text'  => BOX_HEADING_CATEGORIES
			  );
 $coolmenuinfoboxheading = new infoBoxHeading($info_box_contents, true, false, false, false);
 $output_string = $coolmenuinfoboxheading->table_string;


 $info_box_contents = array();
 if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
 } else {
$cat_choose = '';
 }



 $info_box_contents[] = array('text'  => '
<img src="images/trans.gif" width="122" height=105"' . $height . '">');

 $coolmenuinfobox = new infoBox($info_box_contents, false);
 $output_string .= $coolmenuinfobox->table_string;
 //remove all html commments
 $output_string = preg_replace("/<!--.*?-->/", "", $output_string);
 //escape all occurences of "
 $output_string = preg_replace('/"/', '\"', $output_string);
 //escape all occurences of /
 $output_string = preg_replace('/\//', '\/', $output_string);
 //remove trailing \n
 $output_string = preg_replace('/\\n+$/', '', $output_string);
 //replace all \n with ");\ndocument.write("
 $output_string = preg_replace('/\\n/', "\");\ndocument.write(\"", $output_string); 
 //prepend document.write at the beginning and append ");\n
 $output_string = "document.write(\"" . $output_string . "\");\n";
 echo $output_string;
?>
document.write(" <\/TD> <\/TR> ");
//--> </script>
<noscript>
<?php
 include(DIR_WS_BOXES . 'categories.php');
?>
</noscript>

 

 

If this doesn't work make sure you have .js enabled in your browser.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I think I might have found your problem, try this.

 

<?php
/* ------------------------------------------------

 coolMenu for osCommerce

 author:	Andreas Kothe 
 url:		http://www.oddbyte.de
 copyright: 2003 Andreas Kothe
 modified: 2003-07-28 Marc Zacher

 extended to work for javascript enanbled and disabled
 with javascript disabled, the conventional categories box is shown
 this extension is provided by Marc Zacher

 The copyright notice of Andreas Kothe in the html output
 has been removed and put in this header
 since it would cause problems in javascript context.

 Released under the GNU General Public License

 ------------------------------------------------ 
*/

?>
<script type="text/javascript">
<!--
document.write(" <TR> <TD> ");
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
			   'text'  => BOX_HEADING_CATEGORIES
			  );
 $coolmenuinfoboxheading = new infoBoxHeading($info_box_contents, true, false, false, false);
 $output_string = $coolmenuinfoboxheading->table_string;
 $info_box_contents = array();
 if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
 } else {
$cat_choose = '';
 }
 $info_box_contents[] = array('text'  => '
<img src="images/trans.gif" width="122" height=105"' . $height . '">');

 $coolmenuinfobox = new infoBox($info_box_contents, false);
 $output_string .= $coolmenuinfobox->table_string;
 //remove all html commments
 $output_string = preg_replace("/<!--.*?-->/", "", $output_string);
 //escape all occurences of "
 $output_string = preg_replace('/"/', '\"', $output_string);
 //escape all occurences of /
 $output_string = preg_replace('/\//', '\/', $output_string);
 //remove trailing \n
 $output_string = preg_replace('/\\n+$/', '', $output_string);
 //replace all \n with ");\ndocument.write("
 $output_string = preg_replace('/\\n/', "\");\ndocument.write(\"", $output_string); 
 //prepend document.write at the beginning and append ");\n
 $output_string = "document.write(\"" . $output_string . "\");\n";
 echo $output_string;
?>
document.write(" <\/TD> <\/TR> ");
//--> </script>
<noscript>
<?php
 include(DIR_WS_BOXES . 'categories.php');
?>
</noscript>

If this doesn't work make sure you have .js enabled in your browser.

 

 

Tried that still no luck / is is enabled. I am lost but almost have everything up on my server

Link to comment
Share on other sites

Not real sure then. Do you have the most current release with all bug fixes installed? Also I would go back from step one and carefully do each step paying very close attention. I know I have installed this twice on two different stores with no problems.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Ok got everything working. There was an error in the boxes file that was causing the data to crumb. I fixed that and now it is working. If anyone reads this and needs help just pm if i am online or ask me.

I have STS 1.2.1 installed with ms2.2 and cool menu.

If you haven't installed anything for the cool menu on sts can show you an easy way to do this stop 60 minutes worth of work.

Link to comment
Share on other sites

  • 3 weeks later...
i would think replacing "tep_href_link(FILENAME_CONTACT_US"

 

with

 

'subdomain.domain.com' would work

 

 

 

Hi T_love,

That didn't work either, it got me a little closer I think, it might be that I am on a Windows server and the script needs to be written different, I don't know anything about .php so just a guess.

If you have anymore ideas, I am willing to try... Thanks... <_<

Link to comment
Share on other sites

Hi T_love,

That didn't work either, it got me a little closer I think, it might be that I am on a Windows server and the script needs to be written different, I don't know anything about .php so just a guess.

If you have anymore ideas, I am willing to try... Thanks... <_<

 

 

 

 

Hi T_love,

Got it to work!!! Here is the line if anyone needs to add a subdomain.

 

echo 'oCMenu.makeMenu(\'top_4\',\'\',\'Catagorie Name\',\'' . 'http://subdomain.domain.com' . '\')';

 

Thanks a bunch T-love !!!!!! :D

Link to comment
Share on other sites

Hi T_love,

Got it to work!!! Here is the line if anyone needs to add a subdomain.

 

echo 'oCMenu.makeMenu(\'top_4\',\'\',\'Catagorie Name\',\'' . 'http://subdomain.domain.com' . '\')';

 

Thanks a bunch T-love !!!!!!

 

glad you got it working

Edited by T_love
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...