Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Descriptions contribution


NJRAS5

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 3 weeks later...
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!

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!!!!!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...