zanniesattic Posted June 5, 2007 Posted June 5, 2007 I have been trying to customize the catalog page of my store: zanniesattic.com I was able to make a few changes, as you can see. I am trying to change the verbage "Main content of the page" but every time I put any other words in its place, and save it, the page comes up blank. Now, I'm trying to change the right column, I have no need for certain columns, and when I erase the boxes I don't want, the column goes away completely.: <?php /* $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_BOXES . 'shopping_cart.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'); 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'); } 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'); } require(DIR_WS_BOXES . 'reviews.php'); if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); include(DIR_WS_BOXES . 'currencies.php'); } ?> Also, OsCommerce considers my home page "top," I'd like to rename it "home" where would I make that change? I'm clearly new at this, and not competely familiar with php, or even html. I'm kind of winging this, and appreciate the advice. Thanks, Suzanne
spax Posted June 5, 2007 Posted June 5, 2007 I guess you found includes/languages/english/index.php for the "Main content of the page" verbage. Just make sure all your text falls between the 2 single quotes and if you use single quotes (apostrophes) within the text, you escape them with a backslash first. i.e. I can\'t see Suzanne\'s page. Top is located in includes/languages/english.php define('HEADER_TITLE_TOP', 'Top'); change to define('HEADER_TITLE_TOP', 'Home'); Which part of column_right don't you need?
zanniesattic Posted June 5, 2007 Author Posted June 5, 2007 I guess you found includes/languages/english/index.php for the "Main content of the page" verbage. Just make sure all your text falls between the 2 single quotes and if you use single quotes (apostrophes) within the text, you escape them with a backslash first. i.e. I can\'t see Suzanne\'s page. Top is located in includes/languages/english.php define('HEADER_TITLE_TOP', 'Top'); change to define('HEADER_TITLE_TOP', 'Home'); Which part of column_right don't you need? Thank you! That's what my mistake was, I was using quotes("), not a single quote! Silly Me!! Thank you! I changed it to "Home." The boxes I don't need are, well almost all of them really. Reviews--I don't think it's necessary; Languages--I only have one; and Currencies--again, I only have one. I'm sure the error I'm making is a simple one here too. If you could tell me which code gets removed I would greatly appreciate it. Thanks again!
spax Posted June 5, 2007 Posted June 5, 2007 Oh, and BTW, you're Awesome Peter! Stop it :blush: Here you go, use this for column_right.php <?php /* $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_BOXES . 'shopping_cart.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'); 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'); } 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'); } /* require(DIR_WS_BOXES . 'reviews.php'); if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); include(DIR_WS_BOXES . 'currencies.php'); } */ ?> Notice the block comments /* */
zanniesattic Posted June 6, 2007 Author Posted June 6, 2007 Thank you SO much! If I'm not being too much of a pain, is there any (easy) way to get rid of the right column all together, and incorporate that space in with the middle part to make it wider?
spax Posted June 6, 2007 Posted June 6, 2007 Yep, there is. In nearly all the root level files, you'll find this code: <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> Using the Search and Replace facility in your text editor, search for that code and replace it with this code: <!-- <td width="<?php // echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php // echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> //--> <!-- right_navigation //--> <?php // require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> <!-- </table></td>//--> That has everything commented out rather than deleted so if you one day want the right column back, you just need to do the reverse. Just remember before you replace the code, you'll need to put the cart somewhere other than column_right.php. It is an important part of the store. With Search and Replace, it will take you minutes to do all the files.
spax Posted June 6, 2007 Posted June 6, 2007 No problem Suzanne, you are welcome. Just a little FYI - a couple of the images on your site are very heavy (860 kb) which makes it load a little slow. Get them into your graphics software and reduce them down some. Around the 30 kb mark should be maximum size and then if you install a thumbnail contribution, you will get the thumbs generated at about 2 kb. Good luck with your store!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.