lplplpx3 Posted February 14, 2010 Share Posted February 14, 2010 If you take a look at www.smalljewellery.com you can see that my shopping cart displays as '0 0 items' instead of just '0 items', does anyone know how to fix this? Thanks. Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 16, 2010 Author Share Posted February 16, 2010 No ideas??? Anyone??? Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2010 Share Posted February 16, 2010 Check in includes/header.php or include/languages/english.php. Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 16, 2010 Author Share Posted February 16, 2010 What am I looking for? Sorry a newbie. Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2010 Share Posted February 16, 2010 A line that has something like this $currencies->format($cart->show_total()) If you can't find it post the code from includes/header.php. Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 16, 2010 Author Share Posted February 16, 2010 A line that has something like this $currencies->format($cart->show_total()) If you can't find it post the code from includes/header.php. I did a search for $currencies->format($cart->show_total()) and the only 2 files this particular reference was found in was shopping_cart.php and boxes/shopping_cart.php Here is the code from includes/header.php <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <!-- start --> <table class="main_t" align="center" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <!-- end --> <?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 More sharing options...
Guest Posted February 16, 2010 Share Posted February 16, 2010 Gotta love templates. Post the code from contact_us.php Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 16, 2010 Author Share Posted February 16, 2010 Gotta love templates. Post the code from contact_us.php Lol...here you go! <?php /* $Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $ 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'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!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 //--> <!-- body //--> <table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0"> <tr> <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td class="<?php echo CONTENT_WIDTH_TD; ?>"> <?php require"includes/boxes/panel_top.php"; ?><?php echo tep_draw_top77();?> <div class="cont_h1_divide_height"></div> <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?> <?php echo tep_draw_top();?> <?php echo tep_draw_title_top();?> <?php echo HEADING_TITLE; ?> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw1_top();?> <?php if ($messageStack->size('contact') > 0) { ?> <table cellpadding="0" cellspacing="0" border="0"> <tr><td><?php echo $messageStack->output('contact'); ?></td></tr> </table> <?php echo tep_pixel_trans();?> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> </table> <?php echo tep_pixel_trans();?> <?php /* echo tep_draw_infoBox2_top(); */?> <table border="0" width="100%" cellspacing="0" cellpadding="2"><tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table> <?php /* echo tep_draw_infoBox2_bottom(); */?> <?php } else { ?> <?php /* echo tep_draw_infoBox_top(); */?> <table border="0" width="100%" cellspacing="5" cellpadding="0"> <tr> <td class="main"><?php echo ENTRY_NAME; ?></td> <td class="main" style="width:100%;"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main" style="white-space:nowrap;"><?php echo ENTRY_EMAIL; ?></td> <td class="main"><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_ENQUIRY; ?></td> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table> <?php /* echo tep_draw_infoBox_bottom(); */?> <?php echo tep_pixel_trans();?> <?php echo tep_draw_infoBox2_top();?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td></tr> </table> <?php echo tep_draw_infoBox2_bottom();?> <?php } ?> <?php echo tep_draw1_bottom();?> <?php echo tep_draw_bottom();?> </form> <?php echo tep_draw_bottom77();?> </td> <!-- body_text_eof //--> <td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0"> <!-- 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 //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2010 Share Posted February 17, 2010 I was using the above code to try and figure out where they put things. It looks like it might be in includes/column_left.php. Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 17, 2010 Author Share Posted February 17, 2010 Here is includes/column_left: <tr> <td> <table class="header_back1" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <?php echo tep_draw_separator('spacer.gif', '1', '21'); ?><br> <a href="index.php"><?php echo tep_draw_separator('spacer.gif', '100%', '232'); ?></a><br> <?php echo tep_draw_separator('spacer.gif', '1', '19'); ?><br> <div style="padding-left:78px;"> <table cellpadding="0" cellspacing="0" border="0" style="width:auto;"> <tr> <td class="txt_shop"> <?php echo BOX_HEADING_SHOPPING_CART?> : <a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a><br> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> <?php echo tep_draw_separator('spacer.gif', '31', '1'); ?><br> </td> <td style="width:100%;"> <table cellpadding="0" cellspacing="0" border="0"> <?php /* $Id: column_left.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ //require(DIR_WS_BOXES . 'search.php'); if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } /* ------------------------------------------------------- */ /* ------------------------------------------------------- */ if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { //include(DIR_WS_BOXES . 'specials.php'); } /* ------------------------------------------------------- */ if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { // include(DIR_WS_BOXES . 'manufacturers.php'); } /* ------------------------------------------------------- */ require(DIR_WS_BOXES . 'whats_new.php'); // require(DIR_WS_BOXES . 'information.php'); /* ------------------------------------------------------- */ if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { // include(DIR_WS_BOXES . 'product_notifications.php'); } } else { // include(DIR_WS_BOXES . 'product_notifications.php'); } } else { //include(DIR_WS_BOXES . 'best_sellers.php'); } // include(DIR_WS_BOXES . 'left_col_banner.php'); /* ------------------------------------------------------- */ //if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php'); /* ------------------------------------------------------- */ // if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'shopping_cart.php'); /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'reviews.php'); /* ------------------------------------------------------- */ // require(DIR_WS_BOXES . 'search.php'); /* ------------------------------------------------------- */ if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { // include(DIR_WS_BOXES . 'languages.php'); // include(DIR_WS_BOXES . 'currencies.php'); } /* ------------------------------------------------------- */ ?> </table> </td> </tr> </table> </td> </tr> Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2010 Share Posted February 17, 2010 Look in includes/languages/english.php for <?php echo BOX_SHOPPING_CART_EMPTY?> There is probably a 0 there. Remove the 0. Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 17, 2010 Author Share Posted February 17, 2010 english.php has: define('BOX_SHOPPING_CART_EMPTY', ' items'); Found the following in boxes/shopping_cart. Removed the 0 but it made no difference $cart_contents_string .= '</table>'; } else { $cart_contents_string = ' 0 '.BOX_SHOPPING_CART_EMPTY; } Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2010 Share Posted February 17, 2010 This is the section that show your shopping cart that is right above your categories menu. <td class="txt_shop"> <?php echo BOX_HEADING_SHOPPING_CART?> : <a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a><br> This part <?php echo BOX_HEADING_SHOPPING_CART?> Shows the word Shopping Cart. This part <a href="<?php echo tep_href_link('shopping_cart.php')?>"> is the start of the link. <?php echo $cart->count_contents()?> Show the first 0 This part <?php echo BOX_SHOPPING_CART_EMPTY?> Show the word Items. It also has to have the second 0. Did you make sure the files on your server are correct? Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 17, 2010 Author Share Posted February 17, 2010 I think I understand you and of course what you are saying makes perfect sense BUT I have looked everywhere and cannot find an extra 0 other than where mentioned which was changed and didnt make a difference. The files on my server are correct...I am the only one who has access...upload and download etc if thats what you mean. Have a look at this smalljewellery.com/check.jpg Thanks for your help...we're (or you) are close...I can feel it :) Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2010 Share Posted February 17, 2010 I think I understand you and of course what you are saying makes perfect sense BUT I have looked everywhere and cannot find an extra 0 other than where mentioned which was changed and didnt make a difference. The files on my server are correct...I am the only one who has access...upload and download etc if thats what you mean. Have a look at this smalljewellery.com/check.jpg Thanks for your help...we're (or you) are close...I can feel it :) First of all I'm not sure what that picture is from or of, but be carefull if you are posting any settings or anything from server that hackers could use. We don't need anything sensitive eg full pathways, passwords or directory names. What I mean by making sure the files on the server are correct is do the changes show in the files that are on your server. According to that picture you still show this $cart_contents_string = ' 0 '.BOX_SHOPPING_CART_EMPTY; Note the 0. Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 17, 2010 Author Share Posted February 17, 2010 First of all I'm not sure what that picture is from or of, but be carefull if you are posting any settings or anything from server that hackers could use. We don't need anything sensitive eg full pathways, passwords or directory names. What I mean by making sure the files on the server are correct is do the changes show in the files that are on your server. According to that picture you still show this $cart_contents_string = ' 0 '.BOX_SHOPPING_CART_EMPTY; Note the 0. Thanks for the advice, I dont think theres are any sensitive info there. The pic shows where I did searches for box_shopping_cart and box-heading-shopping for ALL the files in the site and what files it found the particular references in. Clicking on each one opens the file for me and I further investigated to see of there were any 0's anywhere except: $cart_contents_string = ' 0 '.BOX_SHOPPING_CART_EMPTY; I removed the 0 and uploaded the file but there was no change. I did it again to double check and still nothing. And yes the change/ date etc does show on the updated file on the server. I restored the file back to the original (as I always do) as there was no change thats why it still shows. I just tried removing the whole thing ' 0 '...uploaded and still no change. Ive cleared cache, cookies and everything so its not that...anyhthing else? Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2010 Share Posted February 17, 2010 Well this is strang. Try this for kicks and grins. First make sure you have a backup of includes/column_left.php. Then change this line <td class="txt_shop"> <?php echo BOX_HEADING_SHOPPING_CART?> : <a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a><br> to <td class="txt_shop"> <?php echo BOX_HEADING_SHOPPING_CART?> : <a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo ' Items'; ?></a><br> Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 17, 2010 Author Share Posted February 17, 2010 I KNEW IT...you found it...I dont know how to thank you. Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2010 Share Posted February 17, 2010 I KNEW IT...you found it...I dont know how to thank you. You're welcome. Is what that means is BOX_SHOPPING_CART_EMPTY is still defined somewhere and has a 0 in it. All I did above was to hard code Items in instead of using the define('BOX_SHOPPING_CART_EMPTY',''); Link to comment Share on other sites More sharing options...
lplplpx3 Posted February 17, 2010 Author Share Posted February 17, 2010 You're welcome. Is what that means is BOX_SHOPPING_CART_EMPTY is still defined somewhere and has a 0 in it. All I did above was to hard code Items in instead of using the define('BOX_SHOPPING_CART_EMPTY',''); Im glad you understand it :blink: coz I sure dont but thanks for your time and have a beer on me! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.