Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

:?:

 

I have osc 2.2 milestone 2 installed. When I install the coolmenu, according to the directions, I get the following errors:

 

Warning: main(DIR_WS_INCLUDEScoolmenu.php): failed to open stream: No such file or directory in /home/sharon/public_html/catalog/index.php on line 14

 

Fatal error: main(): Failed opening required 'DIR_WS_INCLUDEScoolmenu.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sharon/public_html/catalog/index.php on line 14

 

Can someone help me with this?

Posted

In general, when you see DIR_WS_INCLUDES or something like that, it means that you either put this before the require of application_top.php or that you did something that made it impossible for it to read configure.php. The best advice I can give is to go back over the changes you made to index.php, application_top.php, and configure.php to see if you might have made a mistake somewhere. Also, if this version of Cool Menu was made for a different release (like MS1), then it's possible that something got put in the wrong place.

 

Hth,

Matt

Posted

I downloaded the most current file for coolmenu on the contributions list for oscommerce. I followed the install directions to a T. As soon as I take the:

<!-- coolMenu //-->

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

<!-- coolMenu_eof //-->

 

back out of the changed modules, they run just fine.

 

According to the directions for coolmenu this coding was to be added to every file in the Catalog directory. And according to the release notes, this release of coolmenu should be good for all versions of 2.2 CVS. I have to assume that this includes milestone 2 also. If this contribution does not work for milestone 2, please will someone let me know.

Take Care, Sharon

Posted

Is

<!-- coolMenu //-->

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

<!-- coolMenu_eof //-->

before or after the include/require for application_top.php? It would need to be after.

 

Good luck,

Matt

Posted

According to your error, it is on line 14 (which since it would be the second line added would put it before application_top.php which is line 13). However, according to the instructions, you should have added it after the <body tag, which is on line 43, making the code look like this (starting from 43):

<body marginwidth="0" marginheight="0" topmargin="0" >



<!-- coolMenu //-->

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

<!-- coolMenu_eof //-->



<!-- header //-->

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

<!-- header_eof //-->

Hth,

Matt

Posted

There is no application_top.php includes or requires in my index.php file. I have oscommerce 2.2 milestone 2. I would give you my whole index.php file, but it is too long to post here. My site is here:

 

http://uptowngoodies.com/catalog/

 

I have taken some of the coolmenu coding out of this page to avoid the error, but according to the directions the coolmen cloding is supposed to go immediately following the <body.........

 

I did that and got the error message. But, no where is application_top.php included here. Take Care, Sharon

Posted

These are the first 46 lines of a stock 2.2 MS2 index.php (freshly downloaded):

<?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 (c) 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">

</head>

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

<!-- header //-->

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

<!-- header_eof //-->

Posted

WOWWWWW :!: How the heck did that whole front end get lost? I created two copies of the downloaded file on the same day. One for another store that I am working on. On that store, it is all there. I am hoping that there aren't other elements that somehow went to never-never land.

 

I can't tell you how much I appreciate your spending so much time with me tonight on this problem. And now that I see what it is, I cannot believe that you had so much patience to keep looking for the answer. Thanks sooooooo much. Take Care, Sharon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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