NJRAS5 Posted December 20, 2007 Share Posted December 20, 2007 Hi I'm trying to install the Category Descriptions contribution for osCommerce 2.2, which is what I'm using. Everything was going fine until I got to this step (change to be made in admin/categories.php): 7) Locate the following 7 lines (approximately line 85): $categories_image = tep_get_uploaded_file('categories_image'); $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($categories_image['tmp_name'])) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $categories_image['name'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); tep_copy_uploaded_file($categories_image, $image_directory); } REPLACE those 7 lines with the following 11 lines: if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $HTTP_POST_VARS['categories_image'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); $categories_image = ''; } else { $categories_image = tep_get_uploaded_file('categories_image'); $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($categories_image['tmp_name'])) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $categories_image['name'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); tep_copy_uploaded_file($categories_image, $image_directory); } } The problem is, those lines that are supposed to be replaced do not exist in version 2.2 in that file. >_< Does anyone have a fix for this? Quote Link to comment Share on other sites More sharing options...
NJRAS5 Posted December 21, 2007 Author Share Posted December 21, 2007 Hi I'm trying to install the Category Descriptions contribution for osCommerce 2.2, which is what I'm using. Everything was going fine until I got to this step (change to be made in admin/categories.php): 7) Locate the following 7 lines (approximately line 85): $categories_image = tep_get_uploaded_file('categories_image'); $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($categories_image['tmp_name'])) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $categories_image['name'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); tep_copy_uploaded_file($categories_image, $image_directory); } REPLACE those 7 lines with the following 11 lines: if (ALLOW_CATEGORY_DESCRIPTIONS == 'true') { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $HTTP_POST_VARS['categories_image'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); $categories_image = ''; } else { $categories_image = tep_get_uploaded_file('categories_image'); $image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES); if (is_uploaded_file($categories_image['tmp_name'])) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . $categories_image['name'] . "' where categories_id = '" . tep_db_input($categories_id) . "'"); tep_copy_uploaded_file($categories_image, $image_directory); } } The problem is, those lines that are supposed to be replaced do not exist in version 2.2 in that file. >_< Does anyone have a fix for this? No one knows what's up with this? Quote Link to comment Share on other sites More sharing options...
NJRAS5 Posted December 21, 2007 Author Share Posted December 21, 2007 No one knows what's up with this? Somebody's got to know what's up with this, either a fix or a contribution that works. Please????? Quote Link to comment Share on other sites More sharing options...
NJRAS5 Posted December 22, 2007 Author Share Posted December 22, 2007 Never mind. I found something else that actually works. Quote Link to comment Share on other sites More sharing options...
suzithepid Posted January 9, 2008 Share Posted January 9, 2008 Never mind. I found something else that actually works. Please let me know what works! I installed the contributions and, although it works, when I actually add a category description, I get the following error: Warning: Cannot modify header information - headers already sent by (output started at /home/mindscap/public_html/catalog/admin/includes/languages/english.php:611) in /home/mindscap/public_html/catalog/admin/includes/functions/general.php on line 22 Any input? Thanks! Quote Link to comment Share on other sites More sharing options...
NJRAS5 Posted January 9, 2008 Author Share Posted January 9, 2008 Please let me know what works! I installed the contributions and, although it works, when I actually add a category description, I get the following error:Warning: Cannot modify header information - headers already sent by (output started at /home/mindscap/public_html/catalog/admin/includes/languages/english.php:611) in /home/mindscap/public_html/catalog/admin/includes/functions/general.php on line 22 Any input? Thanks! http://addons.oscommerce.com/info/2841 Try this. Not the one I was talking about (can't find it at the moment) but this works great too and is super easy to install :) Quote Link to comment Share on other sites More sharing options...
suzithepid Posted January 9, 2008 Share Posted January 9, 2008 http://addons.oscommerce.com/info/2841 Try this. Not the one I was talking about (can't find it at the moment) but this works great too and is super easy to install :) Thanks, will give it a try. I am still having problems with the administrator since I installed the other category description contribution, and have spent a couple hours trying to fix it. I am pretty aggravated! Thanks, again, Suzii Quote Link to comment Share on other sites More sharing options...
NJRAS5 Posted January 9, 2008 Author Share Posted January 9, 2008 Thanks, will give it a try. I am still having problems with the administrator since I installed the other category description contribution, and have spent a couple hours trying to fix it. I am pretty aggravated! Thanks, again, Suzii Aye, you didn't back up first?? Well good luck!!!!! Quote Link to comment Share on other sites More sharing options...
suzithepid Posted January 10, 2008 Share Posted January 10, 2008 Aye, you didn't back up first?? Well good luck!!!!! I always back up. I could put everything back the way it was, but would rather figure out how to fix the problem first. The cart is still in development, so nothing is being adversely affected yet. I did, with some research, find that the problem I was having was a "white space" problem and by deleting the white space at the end of the catalog/admin/includes/languages/english.php file, after the closing ?>, I fixed the problem. So, if anyone else is having the same problem, it is a simple fix. Suzi Quote Link to comment Share on other sites More sharing options...
NJRAS5 Posted January 10, 2008 Author Share Posted January 10, 2008 I always back up. I could put everything back the way it was, but would rather figure out how to fix the problem first. The cart is still in development, so nothing is being adversely affected yet. I did, with some research, find that the problem I was having was a "white space" problem and by deleting the white space at the end of the catalog/admin/includes/languages/english.php file, after the closing ?>, I fixed the problem. So, if anyone else is having the same problem, it is a simple fix. Suzi Well good, I'm glad you backed up :) Those bloody white spaces - get you every time, lol. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.