Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Subcategory textboxes


chris23

Recommended Posts

  • Replies 269
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi, i have encountered a minor bug. If you add an additional language to your system, and afterwards try to update the category-description, it wont update it at all (only the old languages). The box remains empty ??

 

If you delete the whole category-description and start over again, the you can update all the languages.

 

It seems that it only handles the languages that are installed when the textbox is created.

 

 

regards

jarzom

Link to comment
Share on other sites

Hi, i have encountered a minor bug. If you add an additional language to your system, and afterwards try to update the category-description, it wont update it at all (only the old languages). The box remains empty ??

 

If you delete the whole category-description and start over again, the you can update all the languages.

 

It seems that it only handles the languages that are installed when the textbox is created.

regards

jarzom

 

Jarzom,

 

You're quite right. I hadn't really considered this scenario and it doesn't appear to have been an issue until now.

 

When you add a language, osc has to populate language enabled modules with some default data. For example, when you add a new language, the product description for the new language is set to the contents of the default language. You then edit the data for the new language.

 

This is handled by admin/languages.php

 

What I'll do is upload some brief instructions for modifying admin/languages.php to fix this issue

 

Regards,

 

Chris

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

What I'll do is upload some brief instructions for modifying admin/languages.php to fix this issue

 

This fix has been uploaded to the contrib area. Very quick and easy.

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

is it me being dum at this or is something wrong?

Somebody that can help point a finger at what i should look at?

 

my subcategories look like this:

1146 - Table 'biitl_juze_com.TABLE_EXTRA_CATEGORIES' doesn't exist

select categories_description from TABLE_EXTRA_CATEGORIES where TABLE_EXTRA_CATEGORIES.categories_id=23 and TABLE_EXTRA_CATEGORIES.language_id = '1'

[TEP STOP]

Link to comment
Share on other sites

is it me being dum at this or is something wrong?

Somebody that can help point a finger at what i should look at?

 

my subcategories look like this:

1146 - Table 'biitl_juze_com.TABLE_EXTRA_CATEGORIES' doesn't exist

select categories_description from TABLE_EXTRA_CATEGORIES where TABLE_EXTRA_CATEGORIES.categories_id=23 and TABLE_EXTRA_CATEGORIES.language_id = '1'

[TEP STOP]

 

 

Hi,

 

It looks like you haven't added the following to includes/database_tables.php

 

define('TABLE_EXTRA_CATEGORIES','extra_cat_info'); // added for Subcategory textboxes

 

HTH

 

Chris

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

Hi,

 

It looks like you haven't added the following to includes/database_tables.php

 

define('TABLE_EXTRA_CATEGORIES','extra_cat_info'); // added for Subcategory textboxes

 

HTH

 

Chris

 

Hello Chris,

That did the trick..

Thanks for the fast reply!

 

Steph

Link to comment
Share on other sites

v2.0.3 Uploaded

 

This is a MAINTENANCE release, bundling up all changes / bugs since v2.0.2 26/3/2007.

 

FULL PACKAGE. This is the version you want for a new installation.

 

Upgrade instructions included for users of v2.0.2

 

There are no new features and if you've applied earlier patches or your version is working fine, you can probably skip this.

 

Enjoy.

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

  • 4 weeks later...

Chris

 

I've just installed 2.0.3 - installation a dream, execution even better! Thank you.

 

I would really like the option of placing the textbox BELOW the subcategory links, not above. Could this be a future option?

 

In the meantime, could you suggest the manual mod to place the box below. (I'm a real novice here, but learning fast, don't yet have the confidence to hack at that level of detail!)

 

Alan

Link to comment
Share on other sites

In the meantime, could you suggest the manual mod to place the box below. (I'm a real novice here, but learning fast, don't yet have the confidence to hack at that level of detail!)

 

Hi Alan,

 

I'm sure I've seen you loitering somewhere else on this forum ;)

 

Yes I can suggest where to move the code on index.php and product_info.php but only if you have a vanilla, non-templated osC installation.

 

If you have other install, PM me for my email address so you can send me copies of these two files over. I'll move the code and email them back when I get a mo.

 

Cheers

 

Chris

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

Hi Chris,

 

I have your contribution working great, but have a new challenge. I'd like to add a small image to the subcategory title one level below the main category. Ours is a catering site, and we have "Entrees" as a main category. Under that, some of the entries are more healthy, and the idea is to add a small image of a heart to the title. For example, a healthy entree would look like this: 0f50e0f0.pngHealthy Chicken.

 

Can this be done?

 

Thanks,

 

Bruce

Link to comment
Share on other sites

hello chris

 

I missing the hard code return (nl2br)

 

I type my text in the box

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

and i see it in the box

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

can you fix that

Link to comment
Share on other sites

hello chris

 

I missing the hard code return (nl2br)

 

I type my text in the box

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

and i see it in the box

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

can you fix that

 

Yep.

 

EDIT catalog/includes/modules/products_extra_category.php

 

 

FIND:

 

 

echo ("<tr><td><div class=\"cat_info_box\">".$category_info_text['categories_description']."</div></td></tr>");

 

 

REPLACE with:

 

echo ("<tr><td><div class=\"cat_info_box\">". nl2br($category_info_text['categories_description']) ."</div></td></tr>");

 

 

HTH

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

Yep.

 

EDIT catalog/includes/modules/products_extra_category.php

FIND:

echo ("<tr><td><div class=\"cat_info_box\">".$category_info_text['categories_description']."</div></td></tr>");

REPLACE with:

 

echo ("<tr><td><div class=\"cat_info_box\">". nl2br($category_info_text['categories_description']) ."</div></td></tr>");

HTH

 

Thanks Chris it works fine

 

I have change olso in Product_info this

 

<?php

// category textbox mod

if (DISPLAY_EXTRA_CATEGORIES == 'true' && DISPLAY_CATS_ON_PROD_LISTING == 'true'){

if ($product_check['total'] >= 1) {

// now get textbox description for this *product* and display

$query = tep_db_query("select categories_description from " . TABLE_EXTRA_CATEGORIES . " left join " . TABLE_PRODUCTS_TO_CATEGORIES . " using (categories_id) where " . TABLE_PRODUCTS_TO_CATEGORIES .".products_id=" . (int)$HTTP_GET_VARS['products_id'] . " and " . TABLE_EXTRA_CATEGORIES .".language_id = '" . (int)$languages_id . "'");

while($category_info_text = tep_db_fetch_array($query)){

if(!empty($category_info_text['categories_description'])){ // prevent output where description not set for particular language

echo ("<tr><td colspan=\"2\"><div class=\"cat_info_box\">".nl2br($category_info_text['categories_description'])."</div></td></tr>");

}

}

}

}

?>

 

en it works fine

 

maby you can change it in your greet contribution

 

Thank for the greet support

 

Piet

Link to comment
Share on other sites

Dear all

 

I added this contribution to my OSC 2.2ms2 and I am having problems.

Can you please help me?

 

I uploaded all files and made the necessary changes, also to the catalog/includes/modules/product_listing_col.php as mentioned earlier in this thread.

 

In the admin panel under configuration, Textboxes, I can see the 4 options,

but when I go to admin catalog and click subcategory textbox, I get the message

that the page cannot be loaded.

 

I tried to upload the file catalog/admin/products_extra_category.php again and in

different versions, but I still have the same problem.

 

Did any of you experience the same?

 

I would be glad if somebody can help!

 

Regards

 

Richard

Link to comment
Share on other sites

Dear all

 

I added this contribution to my OSC 2.2ms2 and I am having problems.

Can you please help me?

 

I uploaded all files and made the necessary changes, also to the catalog/includes/modules/product_listing_col.php as mentioned earlier in this thread.

 

In the admin panel under configuration, Textboxes, I can see the 4 options,

but when I go to admin catalog and click subcategory textbox, I get the message

that the page cannot be loaded.

 

I tried to upload the file catalog/admin/products_extra_category.php again and in

different versions, but I still have the same problem.

 

Did any of you experience the same?

 

I would be glad if somebody can help!

 

Regards

 

Richard

 

check the permission on your file.

chances are that is the problem

Link to comment
Share on other sites

check the permission on your file.

chances are that is the problem

 

Hi Naomi

 

many thanks, that solved it! I first time uploaded the files with Oscommerce Filemanager

instead instead of my ftp tool which gave the files unusual permission settings. I changed them

back to 644 and everything is runnig perfectly. Great contribution!

 

Thanks for your help!

 

Regards

 

Richard

Link to comment
Share on other sites

When I click "subcategory textbox" from the admin panel, I am getting a 404 "page not found" error. What am I missing here?

 

Thanks :)

Link to comment
Share on other sites

When I click "subcategory textbox" from the admin panel, I am getting a 404 "page not found" error. What am I missing here?

 

Thanks :)

 

Nancy,

 

Have you definitely uploaded catalog/admin/products_extra_category.php?

 

If you have, what page is your browser trying to display when it returns the 404?

 

Chris

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

  • 3 weeks later...

 

You've forgotten to add the entry

 

define('FILENAME_CATEGORIES_EXTRA','products_extra_category.php');

 

to admin/includes/filenames.php

Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored.

Google Site Search is your friend

My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes

Link to comment
Share on other sites

You've forgotten to add the entry

 

define('FILENAME_CATEGORIES_EXTRA','products_extra_category.php');

 

to admin/includes/filenames.php

 

 

Nope...it's there. Tha twas the first place I looked when this problem came up :(

Any other suggestions?

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