Zen Cart Logo
Forums / General Questions / Shopping Cart Error when enabling inline shipping estimator?

Shopping Cart Error when enabling inline shipping estimator?

Locked

Views: 5,140

Results 1 to 20 of 32
This thread is locked. New replies are disabled.
6 Mar 2008, 6:21 AM
#1
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Shopping Cart Error when enabling inline shipping estimator?

I am getting this error messaging when updating quantity in shopping cart. This doesn't happen everything time:

Fatal error: Cannot redeclare class order in /includes/classes/order.php on line 20

Using ZCV 1.3.8a, PHP 5.2.5, MYSQL 5.0.45 and Apache 2.0

6 Mar 2008, 6:36 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping Cart Error when enabling inline shipping estimator?

Maybe a bug in your own code, but not a bug in Zen Cart in general. (Moving post out of the bug reports area)

"cannot redeclare class" only happens when a PHP file containing the class specified gets loaded a second time.
And that usually only happens when you have extra copies of files left on your server such as shopping_cart_orig.php alongside shopping_cart.php etc, or if you have accidentally put the same class file in another folder whose contents are automatically processed such as extra_functions or extra_datafiles etc.

Find out the pattern behind "it only happens sometimes", and then get rid of the duplicate loading that's happening.

6 Mar 2008, 6:58 AM
#3
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

DrByte:

Maybe a bug in your own code, but not a bug in Zen Cart in general.

"cannot redeclare class" only happens when a PHP file containing the class specified gets loaded a second time.
And that usually only happens when you have extra copies of files left on your server such as shopping_cart_orig.php alongside shopping_cart.php etc, or if you have accidentally put the same class file in another folder whose contents are automatically processed such as extra_functions or extra_datafiles etc.

Find out the pattern behind "it only happens sometimes", and then get rid of the duplicate loading that's happening.

DrByte, if you can give me more pointers that would be great. I am not seeming to find any duplicate files or renamed files. I also have not installed any mods lately so I am lost a bit with this. Hmm...on a second thought, would loading the debugger mod be appropriate in this situation?

Thanks!

6 Mar 2008, 7:06 AM
#4
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

Well, I figure out that this only happens when I turn on the in-line display of shipping estimate. Now I just need to go figure out why that's the case. I change the option from 1 (display shipping estimate button) to a 2 and that's when the problem started. Now that I changed it back to 1 things are working fine but I'd really like the inline display. I will dig more.

6 Mar 2008, 7:31 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping Cart Error when enabling inline shipping estimator?

What version of Zen Cart are you using?
Have you customized any of these files? How are they different from the defaults?
/includes/classes/shopping_cart.php
/includes/modules/[override?]/shipping_estimator.php
/includes/templates/[your_template]/templates/tpl_shopping_cart_default.php
/includes/templates/[your_template]/templates/tpl_modules_shipping_estimator.php

6 Mar 2008, 7:35 AM
#6
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

DrByte:

What version of Zen Cart are you using?
Have you customized any of these files? How are they different from the defaults?
/includes/classes/shopping_cart.php
/includes/modules/[override?]/shipping_estimator.php
/includes/templates/[your_template]/templates/tpl_shopping_cart_default.php
/includes/templates/[your_template]/templates/tpl_modules_shipping_estimator.php

The only file customized is the tpl_shopping_cart_default.php to include display of Google Checkout button. I have pasted the code for that file below:

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=shopping_cart.<br />
 * Displays shopping-cart contents
 *
 * @package templateSystem
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_shopping_cart_default.php 5554 2007-01-07 02:45:29Z drbyte $
 * @version $Id: tpl_shopping_cart_default.php 5936 2007-12-14 18:15:39Z ropu - Added Google Checkout $
 */
?>
<div class="centerColumn" id="shoppingCartDefault">
<?php
  if ($flagHasCartContents) {
?>

<?php
  if ($_SESSION['cart']->count_contents() > 0) {
?>
<div class="forward"><?php echo TEXT_VISITORS_CART; ?></div>
<?php
  }
?>

<h1 id="cartDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if ($messageStack->size('shopping_cart') > 0) echo $messageStack->output('shopping_cart'); ?>

<?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
<div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION; ?></div>

<?php if (!empty($totalsDisplay)) { ?>
  <div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>
  <br class="clearBoth" />
<?php } ?>

<?php  if ($flagAnyOutOfStock) { ?>

<?php    if (STOCK_ALLOW_CHECKOUT == 'true') {  ?>

<div class="messageStackError"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div>

<?php    } else { ?>
<div class="messageStackError"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div>

<?php    } //endif STOCK_ALLOW_CHECKOUT ?>
<?php  } //endif flagAnyOutOfStock ?>

<table  border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
     <tr class="tableHeading">
        <th scope="col" id="scQuantityHeading"><?php echo TABLE_HEADING_QUANTITY; ?></th>
        <th scope="col" id="scUpdateQuantity"> </th>
        <th scope="col" id="scProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
        <th scope="col" id="scUnitHeading"><?php echo TABLE_HEADING_PRICE; ?></th>
        <th scope="col" id="scTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
        <th scope="col" id="scRemoveHeading"> </th>
     </tr>
         <!-- Loop through all products /-->
<?php
  foreach ($productArray as $product) {
?>
     <tr class="<?php echo $product['rowClass']; ?>">
       <td class="cartQuantity">
<?php
  if ($product['flagShowFixedQuantity']) {
    echo $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
  } else {
    echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
  }
?>
       </td>
       <td class="cartQuantityUpdate">
<?php
  if ($product['buttonUpdate'] == '') {
    echo '' ;
  } else {
    echo $product['buttonUpdate'];
  }
?>
       </td>
       <td class="cartProductDisplay">
<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
<br class="clearBoth" />


<?php
  echo $product['attributeHiddenField'];
  if (isset($product['attributes']) && is_array($product['attributes'])) {
  echo '<div class="cartAttribsList">';
  echo '<ul>';
    reset($product['attributes']);
    foreach ($product['attributes'] as $option => $value) {
?>

<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>

<?php
    }
  echo '</ul>';
  echo '</div>';
  }
?>
       </td>
       <td class="cartUnitDisplay"><?php echo $product['productsPriceEach']; ?></td>
       <td class="cartTotalDisplay"><?php echo $product['productsPrice']; ?></td>
       <td class="cartRemoveItemDisplay">
<?php
  if ($product['buttonDelete']) {
?>
           <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>"><?php echo zen_image($template->get_template_dir(ICON_IMAGE_TRASH, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TRASH, ICON_TRASH_ALT); ?></a>
<?php
  }
  if ($product['checkBoxDelete'] ) {
    echo zen_draw_checkbox_field('cart_delete[]', $product['id']);
  }
?>
</td>
     </tr>
<?php
  } // end foreach ($productArray as $product)
?>
       <!-- Finished loop through all products /-->
      </table>

<div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $cartShowTotal; ?></div>
<br class="clearBoth" />

<!--bof shopping cart buttons-->
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>
<div id="cshopping" class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>
<?php
// show update cart button
  if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) {
?>
<div class="buttonRow back"><?php echo zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT); ?></div>
<?php
  } else { // don't show update button below cart
?>
<?php
  } // show update button
?>
<!--eof shopping cart buttons-->
</form>

<?php
    if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') {
?>

<div class="buttonRow back"><?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
 zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATOR, BUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'; ?></div>
<?php
    }
?>
<!-- * BEGIN GOOGLE CHECKOUT * -->
 <?php
  // ** GOOGLE CHECKOUT **
    include(DIR_WS_MODULES . 'show_google_components.php');  
  // ** END GOOGLE CHECKOUT **
 ?>
<!-- * END GOOGLE CHECKOUT * -->
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
<?php  // the tpl_ec_button template only displays EC option if cart contents >0 and value >0
if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') {
  include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
}
?>
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
<br class="clearBoth" />
<?php
      if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '2') {
/**
 * load the shipping estimator code if needed
 */
?>
      <?php require(DIR_WS_MODULES . zen_get_module_directory('shipping_estimator.php')); ?>

<?php
      }
?>
<?php
  } else {
?>

<h2 id="cartEmptyText"><?php echo TEXT_CART_EMPTY; ?></h2>

<?php
$show_display_shopping_cart_empty = $db->Execute(SQL_SHOW_SHOPPING_CART_EMPTY);

while (!$show_display_shopping_cart_empty->EOF) {
?>

<?php
  if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_FEATURED_PRODUCTS') { ?>
<?php
/**
 * display the Featured Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>

<?php
  if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS') { ?>
<?php
/**
 * display the Special Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>

<?php
  if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS') { ?>
<?php
/**
 * display the New Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>

<?php
  if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_UPCOMING') {
    include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
  }
?>
<?php
  $show_display_shopping_cart_empty->MoveNext();
} // !EOF
?>
<?php
  }
?>
</div>

The only time I experience this problem is if I enable shipping estimate to display inline instead of popup.

Thanks!

6 Mar 2008, 7:45 AM
#7
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

I changed my shipping estimator back to 1 for display of button. If you see anything wrong with the above code please let me know. I only get this problem when I enable inline display of shipping estimates. I am not sure which mod is trying to redeclare something that has already been declared or what's causing this problem.

Thanks!

6 Mar 2008, 9:06 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping Cart Error when enabling inline shipping estimator?

If you put the code back to the default code supplied with Zen Cart without any modifications, what happens?

I'm inclined to believe that you've got extra files kicking around, which need to be tracked down ... http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

... or else you've got customized code that's reloading the shopping_cart class unnecessarily.

6 Mar 2008, 2:52 PM
#9
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

DrByte:

If you put the code back to the default code supplied with Zen Cart without any modifications, what happens?

I'm inclined to believe that you've got extra files kicking around, which need to be tracked down ... http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

... or else you've got customized code that's reloading the shopping_cart class unnecessarily.

DrByte,

Thanks so much for troubleshooting with me on this. I woke up this morning and I am not able to duplicate the problem. I completely agree that I have something going on but pinpoint it is going to be a challenge. I reverted back to the original template which didn't show any problem. I then went back to my template with just google checkout implementation and that didn't show any problem either.

The other thing that I uninstalled is mod that I had for cart upsell which used to show up in the shopping cart. I don't know if that's it or not.

I turned back the inline shipping quote again to see if any of our employees or customers trigger the error again. IF it's trigger, I do see the error in our log so it will be easier to spot. We however can go for days before it's triggered again.

I will read up on the links you sent.

Thanks!

6 Mar 2008, 2:54 PM
#10
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

Also, here is another change that was made in that file. I don't know if you see any problem with this code:

<div id="cshopping" class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>

We added a div id="cshopping" to correct alignment problem. I don't know if this will be responsible for loading something it's not suppose to.

Thanks!

6 Mar 2008, 7:54 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping Cart Error when enabling inline shipping estimator?

BlessIsaacola:

Also, here is another change that was made in that file. I don't know if you see any problem with this code:

<div id="cshopping" class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div> ``` > > We added a div id="cshopping" to correct alignment problem. I don't know if this will be responsible for loading something it's not suppose to. > > Thanks!

No, it's unrelated.

6 Mar 2008, 9:21 PM
#12
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

The file compare did not solve the problem for me because I cannot figure out which file or mod is causing "Cannot redeclare class order in /includes/classes/order.php on line 20" Although this is happening on the shopping cart page it almost like there is a file or mod creating this problem before I even get to the shopping cart page.

I can also confirm that this problem happens even when I am using the standard (unmodified) tpl_shopping_cart_default.php. Out of the 100s of hits to the shopping cart page today, there are only 3 users that trigger this error.

The thing that is bugging me the most about this is if I do not enable shipping estimate to display inline, this problem goes away. I can help but think what am I triggering by turning inline shipping estimate on?

Here is line 20-22:

class order extends base {
  var $info, $totals, $products, $customer, $delivery, $content_type, $email_low_stock, $products_ordered_attributes,
  $products_ordered, $products_ordered_email, $attachArray;

Can someone please explain the code above to me. I don't get why line 20 is an issue.

Any other suggestions on how to solve this problem?

Thanks!

6 Mar 2008, 10:30 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping Cart Error when enabling inline shipping estimator?

BlessIsaacola:

Here is line 20-22:

class order extends base {
var $info, $totals, $products, $customer, $delivery, $content_type, $email_low_stock, $products_ordered_attributes,
$products_ordered, $products_ordered_email, $attachArray;

> 
> Can someone please explain the code above to me. I don't get why line 20 is an issue.Line 20 is the issue because it's a duplicate statement according to PHP.

If the order.php file (or one containing that same statement in it) has already been loaded previously, PHP sees this as an attempt to "redeclare" the class ... which is not permitted.

That's why I've been saying that you've likely got extra backup files kicking around. Either that or you've altered some code that loads the order.php class file and caused it to happen a second time.


Apologies about mentioning the shopping_cart class in previous posts ... somehow I had read that it was the shopping-cart class that was redeclared, not the order class.  Nevertheless, the root cause remains as described.
6 Mar 2008, 11:27 PM
#14
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

Thanks DrByte for the thorough explanation. I will keep back tracking to see if I can find where I may have messed things up. The mods that we use that may be suspect are ty package tracker, google checkout and Zen TagCloud. I will check those mods and see if anything is obvious.

Although turning off inline shipping estimate display solves this problem, I want to get to the bottom of this so we can offer inline display.

Thanks again.

26 Apr 2008, 1:52 PM
#15
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

Well, because this problem is not solved and I would really like to use inline shipping estimator, I am wondering if someone can help me get to the bottom of this.

What other files or functions could possibly load this class that is causing this error? PHP Fatal error: Cannot redeclare class order in /includes/classes/order.php on line 20

This what I see when using developers tool to search the files:

/CUSTOMadminFOLDER/includes/classes/order.php
Line #9 : class order {

includes/classes/order.php
Line #19 : class order extends base { This is saying line 19 even though the actual line is 20...I wonder why

includes/classes/order_total.php
Line #20 : class order_total extends base {

Should all the above files have that?

26 Apr 2008, 1:53 PM
#16
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

I should also add that turning on the debugging tool did not generate any error log about this.

26 Apr 2008, 6:05 PM
#17
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,883
Plugin Contributions:
3

Re: Shopping Cart Error when enabling inline shipping estimator?

You could try adding this line to the beginning of order.php (before the class definition)

var_dump(debug_backtrace());

at the very least this should tell you th name of the file that is trying to include the order class.

NB : best not done on a live site :)

26 Apr 2008, 6:21 PM
#18
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

wilt:

You could try adding this line to the beginning of order.php (before the class definition)

var_dump(debug_backtrace());

at the very least this should tell you th name of the file that is trying to include the order class.

NB : best not done on a live site :)

What's the implication of testing this in production since that's where the problem occurs. Because it's a random problem I am not able to duplicate the problem at will. If I can do this production, there is a better chance the problem will get trigger sooner than later.

26 Apr 2008, 6:42 PM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping Cart Error when enabling inline shipping estimator?

Adding the debug code he suggested will put debug code on the screen every time an order object is instantiated in the code ... all your customers will see the debug output. That's why you don't want it on a production server.

You could alternatively compare your site vs a fresh default fileset, and get rid of duplicate files, extra files, backup files, etc that you've left on the server. Custom code that's reloading things could also be a problem. It's bad practice to leave backup files on the server if they are left with a .php extension, since in many places they could be auto-loaded.
But, I'm repeating myself again now.

26 Apr 2008, 6:52 PM
#20
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Shopping Cart Error when enabling inline shipping estimator?

Thanks for the clarification. I did the file compare thing which basically just confirmed that my 1.3.8a files are the same as the one downloaded. I am lost so for now I will turn off inline shipping estimator. I wish I understand the logic behind how the shipping estimator works when it's enable for inline display versus displaying the shipping estimator button.

It's so confusing that this problem ONLY happens when I enable the shipping to show in the showing cart versus displaying the button to estimate shipping. What file is called when shipping estimator button is enabled versus when it's set to displayed on the shopping cart page. What's even more baffling is the fact that it doesn't happen all the time and I cannot come up with the combination or events to trigger the error.

What's the code suppose to do?```php
class order_total extends base {


Could supertracker be responsible? user tracking? I am just trying to find a place to troubleshoot other than uninstall everything and start over.