arkisaeo Posted July 25, 2011 Posted July 25, 2011 I am absolutely confused and totally lost with this one. :blink: Yesterday, I attempted to install a new add-on (individual product shipping prices) I created a backup of the database and the files that had to be edited. It was not working, despite bug fixes and whatnot, so I replaced the edited files with the previous versions and fixed the edits done to the database. Apparently, something is screwed up and I don't know what. Any time you try to add any product to the shopping cart, an error message pops up. Instead of seeing the cart contents, I get this: "Fatal error: Class 'infoBoxHeading' not found in /hermes/bosweb/web136/b1363/ipw.allensna/public_html/shopping_cart.php on line 20" First of all, that directory (/hermes/bosweb/etc.) does not exist anywhere in the account/files. So, I have no idea why it would try to go there. I also have no idea how (or if its even possible) to edit that path. Second, line 20 of shopping_cart.php is new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART)); So, I am wondering.. why would it show that error and how can it be fixed? :huh: I'll post the full code below, but I must point out that this is not my site. I am editing it for someone else and they had a different designer prior to me. This is not a file I edit (unless an add-on requires it), so if content is missing, I'm not fully aware of what should be where (and I don't have a fresh install to compare it to, only other modified ones). <?php /* $Id: shopping_cart.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- shopping_cart //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART); new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART)); $cart_contents_string = ''; if ($cart->count_contents() > 0) { $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">'; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $cart_contents_string .= '<tr><td align="right" valign="top" class="infoBoxContents">'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { $cart_contents_string .= '<span class="newItemInCart">'; } else { $cart_contents_string .= '<span class="infoBoxContents">'; } $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { $cart_contents_string .= '<span class="newItemInCart">'; } else { $cart_contents_string .= '<span class="infoBoxContents">'; } $cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { tep_session_unregister('new_products_id_in_cart'); } } $cart_contents_string .= '</table>'; } else { $cart_contents_string .= BOX_SHOPPING_CART_EMPTY; } $info_box_contents = array(); $info_box_contents[] = array('text' => $cart_contents_string); if ($cart->count_contents() > 0) { $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'right', 'text' => $currencies->format($cart->show_total())); } new infoBox($info_box_contents); ?> </td> </tr> <!-- shopping_cart_eof //-->
arkisaeo Posted July 25, 2011 Author Posted July 25, 2011 Problem fixed. The issue: I accidentally saved catalog/includes/boxes/shopping_cart.php as catalog/shopping_cart.php Once it was replaced with the right shopping_cart.php file, everything worked fine. So, if anyone else has this (or other fatal error issues), make sure you are saving the right file to the right location! :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.