Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Added iOSC3 and Now get Fatal Error


Guest

Recommended Posts

Hi everyone. Today, I downloaded and added parts for iOSC3 to my catalog and php files according to the instructions:: http://addons.oscommerce.com/info/7636

 

However, now, when I visit the store portion of my website, I get this error:: Fatal error: Call to a member function size() on a non-object in /home7/thebroo2/public_html/catalog/includes/header.php on line 13

 

The strange thing is, is that I have not altered the code for my header.php file at all. Help?

 

Line 13-15::

  if ($messageStack->size('header') > 0) {
   echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';
 }

 

 

Entire header.php

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 if ($messageStack->size('header') > 0) {
   echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';
 }
?>

<div id="header" class="grid_24">
 <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>

 <div id="headerShortcuts">
<?php
 echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
      tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
      tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

 if (tep_session_is_registered('customer_id')) {
   echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
 }
?>
 </div>

<script type="text/javascript">
 $("#headerShortcuts").buttonset();
</script>
</div>

<div class="grid_24 ui-widget infoBoxContainer">
 <div class="ui-widget-header infoBoxHeading"><?php echo '  ' . $breadcrumb->trail(' » '); ?></div>
</div>

<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
   <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
 </tr>
</table>
<?php
 }
?>

Link to comment
Share on other sites

The problem is in /catalog/includes/application_top.php

 

The last 2 lines of code before the ending PHP tag in /catalog/includes/application_top.php

need to be:

 

  require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

I can duplicate your error by removing that last line of code.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 2 weeks later...

The problem is in /catalog/includes/application_top.php

 

The last 2 lines of code before the ending PHP tag in /catalog/includes/application_top.php

need to be:

 

  require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

I can duplicate your error by removing that last line of code.

 

Oh great! You are my absolute hero! Thank you very, very much!

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