foxkitsinc Posted March 22, 2008 Posted March 22, 2008 When I visit my site for the first time each day I can go to my catalog via any of the links on my home page (menu button or navigation images) and everything works fine. If I close the catalog and re-enter it later the categories box is missing regardless of how I enter the catalog. I have not been able to find any posts similar to this. An important note: my host recently migrated my site to a new server. We have been working out some bugs and they have made some code changes in my osCommerce files to fix link problems. Everything else seems to be working now but this problem persists. I have emptied my cache and cookies and the problem still persists. Does anyone have advice on what I should try? My site is located at: www.foxkitsinc.com Try entering my catalog using either the menu button "catalog" or any of the navigation grapic images in the middle of the page. That takes you to my secure server and my osC catalog. Check that the categories box is visible as you navigate the site and that everything else seems in order. Then close the catalog (you don't have to exit my home page as it is still open.) Now, enter the catalog again via any of the mentioned means... is the categories box visible? My host insures me that they can see it but I can't. Thank you for any help you can give.
germ Posted March 22, 2008 Posted March 22, 2008 Post the code from /osCommerce/catalog/includes/column_left.php Why is your catalog SSL? :unsure: The whole catalog has no reason to be SSL. Google doesn't index SSL pages (I don't know about other engines), therefore nothing in your catalog will ever appear in Google if you leave things as they are. :blush: 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 >
foxkitsinc Posted March 24, 2008 Author Posted March 24, 2008 Well, frankly, I had my hosting company put everything in the SSL because after they migrated my site there were so many link problems and it took so long to get help that it was expedient to have it all in one place (the KISS principle) in order to get them to fix the mess they made. Once it is fixed perhaps I will move it back to the regular server. Since I am not a professional programmer I really am not prepared to fix problems brought no by my host - I can barely keep up with the problems I cause. Do you have any ideas as to why my categories box is missing on subsequent visits? What should I do to get the site back to the normal server once this problem is fixed? I know that the files are there - it is just a matter of links I would imagine - which ones? What files are they in? Thanks.
germ Posted March 24, 2008 Posted March 24, 2008 Do you have any ideas as to why my categories box is missing on subsequent visits? I'm thinking it's something in the code I asked you to post (which you haven't). :blush: We can address your other concerns later. 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 >
foxkitsinc Posted March 24, 2008 Author Posted March 24, 2008 Jim, I'm sorry, I missed the first line asking for the code entirely. Here it is: <?php /* $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.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 . 'search.php'); require(DIR_WS_BOXES . 'information.php'); ?> Thanks for your help.
germ Posted March 24, 2008 Posted March 24, 2008 That looks "standard". :thumbsup: After you saying your host "fiddled" with your code... Well, frankly I was expecting a mess! :lol: Let's try this. Login to your Admin. Click on Configuration --> Cache On that page set "Use Cache" to false. Save it. See if that helps. Your problem is "unique" to my knowledge. I'm hoping something simple like this will cure it. :) 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 >
foxkitsinc Posted March 24, 2008 Author Posted March 24, 2008 Excellent!!! :thumbsup: That fixed the problem. When I changed cache to false everything worked as before. While there, I saw the cache address and realized what had happened. When they migrated my site they changed the folder structure and several layers of folders are no longer in existance. So, I changed the address to match the new structure and it works that way too. I never messed with the cache before so I didn't even realize it was there. Thank you soooo much. You had mentioned that I should not have all of my catalog routed through SSL. Is it very involved to put it back to regular http: routing? At what point will it go secure? Will it do so automatically or do I need to fix that too? Man, I hate it when they move my stuff around... my wife already knows better. :rolleyes:
germ Posted March 24, 2008 Posted March 24, 2008 osC is programmed to only use SSL when necessary. Like login, account create & edit, and checkout. Changing it to work like it was meant to should be just a few simple modifications of your configure file. Post the contents of /osCommerce/catalog/includes/configure.php between CODE tags, please. BE AWARE!!! THE BOTTOM OF THIS FILE MAY CONTAIN SENSITVIE INFO ABOUT YOUR DATABASE (USERNAME/PASSWORD). DO NOT POST ANY "SENSITIVE" INFORMATION PRESENT IN THIS FILE!!! There are a few images on your pages that are causing the "non secure items" popup in IE. We can fix that, too. 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 >
foxkitsinc Posted March 24, 2008 Author Posted March 24, 2008 Sorry this took so long - I am juggling several projects at once and had to download it because my host had modified it. I wasn't sure if anything other than the username and password were sensitive so I just starred out the database names too. <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'https://foxkitsi.ipower.com'); define('HTTPS_SERVER', 'https://foxkitsi.ipower.com'); define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'foxkitsi.ipower.com'); define('HTTPS_COOKIE_DOMAIN', 'foxkitsi.ipower.com'); define('HTTP_COOKIE_PATH', '/osCommerce/catalog/'); define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/'); define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/osCommerce/catalog/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/users/web/b1963/ipw.foxkitsi/public_html/osCommerce/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', '********.com'); // eg, ********.com - should not be empty for productive servers define('DB_SERVER_USERNAME', '********'); define('DB_SERVER_PASSWORD', '********'); define('DB_DATABASE', '********'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?> Thanks again.
foxkitsinc Posted March 24, 2008 Author Posted March 24, 2008 Jim, Line 34 in this file: define('DIR_FS_CATALOG', '/home/users/web/b1963/ipw.foxkitsi/public_html/osCommerce/catalog/'); is the line that was in my cache directory of my Admin. I deleted the "/users/web/b1963/ipw.foxkitsi" because there were no such folders. Doing that made my categories box show up again. Should I change that line in this file too? Thanks, BK
germ Posted March 24, 2008 Posted March 24, 2008 Here are my recommendations: <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) // define('HTTP_SERVER', 'https://foxkitsi.ipower.com'); define('HTTP_SERVER', 'http://www.foxkitsinc.com'); define('HTTPS_SERVER', 'https://foxkitsi.ipower.com'); define('ENABLE_SSL', true); // secure webserver for checkout procedure? // define('HTTP_COOKIE_DOMAIN', 'foxkitsi.ipower.com'); define('HTTP_COOKIE_DOMAIN', '.foxkitsinc.com'); // define('HTTPS_COOKIE_DOMAIN', 'foxkitsi.ipower.com'); define('HTTPS_COOKIE_DOMAIN', '.foxkitsi.ipower.com'); // define('HTTP_COOKIE_PATH', '/osCommerce/catalog/'); define('HTTP_COOKIE_PATH', '/'); // define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/osCommerce/catalog/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/users/web/b1963/ipw.foxkitsi/public_html/osCommerce/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', '********.com'); // eg, ********.com - should not be empty for productive servers define('DB_SERVER_USERNAME', '********'); define('DB_SERVER_PASSWORD', '********'); define('DB_DATABASE', '********'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?> Every one that I changed, and I only changed 5 lines, I left the old value on the previous line, but with "//" in front of it. I don't expect any of these changes to affect your site in a detrimental manner, but if something goes awry it will be easy for you to see the "old values" and change things back. One other change you need to make not seen here. On your Homepage of your site, change the link to access the store to this: http://www.foxkitsinc.com/osCommerce/catalog/index.php "Kick the tires" with these values and let me know what you think. If things work out, then we'll move on and fix the two items that generate "non secure items" popup in IE. Go ahead and make the change on line 34, just remeber the old value in case you need to change it back. I guess it would be a good idea to just backup the file as it is before making any changes at all... 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 >
foxkitsinc Posted March 25, 2008 Author Posted March 25, 2008 Jim, Wow! Those suggestions were great. I made all the changes on the configure.php file and they worked perfectly. The secure / non-secure features are working as designed as well. Now I even have MY url in the address box instead of that messed up mix my host told me to use - thanks. I changed all the links on my home page that are in the NavImage and that works well too. I will get to the link on the menu bar next... it is on every page and I can change it once but I have to upload every page I think. I did have to change that line 34 back to it's original form though... it was giving me an error on the downloadable products directory. When I changed it back there was no problem. I am not getting the secure / non-secure message you mentioned (I am using FireFox); are you still getting that?
germ Posted March 25, 2008 Posted March 25, 2008 No. Firefox is fine. It's "smarter" than IE. Access your site with IE, go to a "secure" page, and you'll see what I mean. It's just two minor changes, as far as I can tell. If you want to address them post the code from this file (between CODE tags): /osCommerce/catalog/includes/boxes/information.php Then this piece of code is the other offender: <img src="http://www.foxkitsinc.com/osCommerce/catalog/images/pay_by.gif" width="160" height="80" border="0"> It's either in your main index.php, just after this line: <!-- right_navigation //--> Or in this file: /osCommerce/catalog/includes/column_right.php If it's in the column_right.php file, post the whole file between code tags. If it's in your index.php file, just post the line it's on. 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 >
foxkitsinc Posted March 25, 2008 Author Posted March 25, 2008 Jim, Here is the code for the information box: <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); // start of code to place link inside category box $info_box_contents[] = array('align' => 'left', 'text' => '<a href="http://www.foxkitsinc.com/wilderness_survival/survival_school/training.htm" target="_blank"><img src="http://www.foxkitsinc.com/osCommerce/catalog/images/schedule.gif" width="160" height="80" border="0"></a>' ); // end of code to place link inside category box new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> I still can't find the other image in either of the other two files... the sad thing is that I put it somewhere... I had to make that graphic and was so proud of myself for getting it on the osC page... :blush: I'll keep looking for it.
germ Posted March 25, 2008 Posted March 25, 2008 MAKE A BACKUP BEFORE MAKING ANY EDITS!!! Change this code: // start of code to place link inside category box $info_box_contents[] = array('align' => 'left', 'text' => '<a href="http://www.foxkitsinc.com/wilderness_survival/survival_school/training.htm" target="_blank"><img src="http://www.foxkitsinc.com/osCommerce/catalog/images/schedule.gif" width="160" height="80" border="0"></a>' ); // end of code to place link inside category box to: // start of code to place link inside category box if ( $request_type != 'SSL' ) { $info_box_contents[] = array('align' => 'left','text' => '<a href="http://www.foxkitsinc.com/wilderness_survival/survival_school/training.htm" target="_blank"><img src="images/schedule.gif" width="160" height="80" border="0"></a>'); } else { $info_box_contents[] = array('align' => 'left','text' => '<a href="https://foxkitsi.ipower.com/wilderness_survival/survival_school/training.htm" target="_blank"><img src="images/schedule.gif" width="160" height="80" border="0"></a>'); } // end of code to place link inside category box 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 >
foxkitsinc Posted March 25, 2008 Author Posted March 25, 2008 Jim, I finally found the other graphic using a search. I put it in the catalog/includes/boxes/shopping_cart.php file right at the top: <img src="http://www.foxkitsinc.com/osCommerce/catalog/images/pay_by.gif" width="160" height="80" border="0"> <?php /* $Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $ 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 //--> I'm guessing I should make similar changes to it as you did to the other one? The recommendations to fix the graphic in the information box worked great. Is there a better place to put it to get it to show up where it is on the site? Thanks.
germ Posted March 25, 2008 Posted March 25, 2008 Change this: <img src="http://www.foxkitsinc.com/osCommerce/catalog/images/pay_by.gif" width="160" height="80" border="0"> to: <img src="images/pay_by.gif" width="160" height="80" border="0"> As long as you know where to find things, it doesn't really matter where to put them in the code. After you make this change, try your site with Internet Explorer. As far as I can tell, you shouldn't get the "non-secure" items popup on secure pages any longer. 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 >
foxkitsinc Posted March 25, 2008 Author Posted March 25, 2008 Perfect!! :lol: All of the secure / non-secure messages are gone and everything seems to be working as designed. Tomorrow, no doubt, my host will want to move my site again... :huh: Thank you so much. I would have taken weeks to figure this out on my own.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.