Latest News: (loading..)
kymation

[Contribution] Categories Images Box support thread

205 posts in this topic

This Addon adds its own images to use in the box, so it should be safe to use with any of the multiple images addons.

 

Regards

Jim

 

Hello I applied the contribution but now I get the following message on my page:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/mysite/public_html/includes/header.php:229) in /home/mysite/public_html/includes/boxes/categories.php on line 59

 

Can someone help me please thanks alot everyone.

Share this post


Link to post
Share on other sites

Hi Jim

 

I love this contribution, and thought I had installed it correctly. However When i come to upload images for the categories, I have the following label instead of English:

 

TEXT_CATEGORIES_IMAGE_FRONT

 

Having said that when i come to edit the category, the label shows perfectly.

 

Have I done something wrong and if so, what? Please advise.

Edited by dvharrison

Share this post


Link to post
Share on other sites

I have written the code to rectify this in the admin/includes/languages/english/categories.php file:

 

define('TEXT_NEW_CATEGORY_INTRO', 'Please fill out the following information for the new category');

define('TEXT_CATEGORIES_NAME', 'Category Name:');

define('TEXT_CATEGORIES_IMAGE', 'Category Image:');

define('TEXT_CATEGORIES_IMAGE_FRONT', 'Category Front Image:');

define('TEXT_SORT_ORDER', 'Sort Order:');

 

Hope I weren't the only one to find this! :blush: :-"

Share this post


Link to post
Share on other sites

Hi, I have installed this contribution on my new store and I thought all was well, however just by chance I saw my home page on my sons laptop using Internet Explorer, I only use firefox, and the categories boxes were not showing. They are showing in Firefox. Can someone please tell me why?

 

I have 2 sites I am currently working on which are classgifts.co.uk and topclassfurniture.co.uk and this is happening with both stores. If someone could look at these via both firefox and IE it would be much appreciated.

 

Thanks, Michael

Both sites work for me in Firefox and IE 8.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hello I applied the contribution but now I get the following message on my page:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/mysite/public_html/includes/header.php:229) in /home/mysite/public_html/includes/boxes/categories.php on line 59

 

Can someone help me please thanks alot everyone.

tep_show_category() should never be declared in includes/header.php. It shouldn't even be used there. You've made an error in editing that file.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I have written the code to rectify this in the admin/includes/languages/english/categories.php file:

 

Hope I weren't the only one to find this! :blush: :-"

Yes, that's a bug, and your fix is perfect. Thanks for reporting it.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Both sites work for me in Firefox and IE 8.

 

Regards

Jim

 

Thanks Jim for your reply. Unfortnately my computer has been down for 2 days so I could not post a comment on my problem. I have infact solved the problem and I am fraid to say the problem was me. On page 6 of this thread MarcelN asked if there was a way to increase the image size without altering the values of SMALL_IMAGE.

 

It was mentioned to alter the code from:

 

$info_box_text .= tep_image (DIR_WS_IMAGES . $category['image'], $category['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="2" vspace="3"');

 

to

 

$info_box_text .= tep_image (DIR_WS_IMAGES . $category['image'], $category['name'], 'WIDTH="25" HEIGHT="25"', 'hspace="2" vspace="3"');

 

This is what I did and it worked in Firefox which was the only browser I was using. What I failed to do was read further into the thread to find that caused a problem and you in fact gave an answer on what to do.

 

I have now done what you suggested on page 6 and everything now works fine.

 

Just goes to prove that its good to read and then read again to make sure.

 

Sorry for bothering you all when the answer was already there and all I had to do was read it.

 

Michael

Share this post


Link to post
Share on other sites

Yes, that's a bug, and your fix is perfect. Thanks for reporting it.

 

Regards

Jim

 

Cool. First time I've ever fixed a bug for someone! B)

Share this post


Link to post
Share on other sites

Hi.

 

Installed this contribution some time ago - and it works great for me.

 

However, not that my shop is up and running, Im spending some time cleaning up some code issues.

 

When I installed this contribution, I think I must have somehow run the sql more than once, so my admin page looks like this :

 

Show box True

Show box True Info

Show box True Info

Show images in box True Info

Show images in box True Info

Show images in box True Info

Show name in box True Info

Show name in box True Info

Show name in box True Info

Show description in box True Info

Show description in box True Info

Show description in box True Info

Box style Grid Info

Box style Grid Info

Box style Grid Info

Box columns 4 Info

Box columns 4 Info

Box columns 4 Info

Box frame style Simple Info

Box frame style Simple Info

Box frame style Simple Info

 

As you can see, all enteries are there 3 Times. Everything works as it should, but I would really like to clean this up.

 

Any ideas please?

 

Thanks

Share this post


Link to post
Share on other sites

You will need to edit your database manually and remove the extra entries. Entries are in the Configuration table with a configuration_group_id value of 112 (unless you changed it.)

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi Again,

 

Made a post in the General forum, but this might be a better place:

 

I have installed the contribution by Spooks for hiding Categories This One and it works great.

 

However I have the categories image box contribution installed as well.

 

The hide categories works on the admin side, and hides the category from the Menu (in my case dynamenu) but it does not hide it in the categories image box.

 

I cannot find a support thread for this.

 

At the bottom of the install instructions, Sam says

 

 

There may other instances I have missed, the genereral Rule is: If there is a general tep_db_query including TABLE_CATEGORIES add the filter: and categories_status = 1

 

but I am completely lost in adding this to the categories image box code.

 

I think I have found the block of code to modify in catalog/includes/modules/categories_images.php

 

which reads as this:

 

 $categories_query = tep_db_query ("select c.categories_id, 
                                             c.categories_image_front, 
                                             cd.categories_description_front, 
                                             cd.categories_name
                                       from " . TABLE_CATEGORIES_DESCRIPTION . " cd,
                                           " . TABLE_CATEGORIES . " c 
                                      where c.parent_id = '0' 
                                        and c.categories_id = cd.categories_id 
                                        and cd.language_id = '" . (int) $languages_id . "' 
                                      order by c.sort_order
                                    ");

 

 

 

I have tried modding this as :

 

$categories_query = tep_db_query ("select c.categories_id, 
                                             c.categories_image_front, 
                                             cd.categories_description_front, 
                                             cd.categories_name
                                       c.categories_status
                                      from " . TABLE_CATEGORIES_DESCRIPTION . " cd,
                                           " . TABLE_CATEGORIES . " c 
                                      where c.parent_id = '0' 
                                               and c.categories_status = '1'
                                        and c.categories_id = cd.categories_id 
                                        and cd.language_id = '" . (int) $languages_id . "' 
                                      order by c.sort_order
                                    ");

 

 

 

But I get an SQL error on my index page as follows:

 

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.categories_status from categories_descri' at line 5

 

select c.categories_id, c.categories_image_front, cd.categories_description_front, cd.categories_name c.categories_status from categories_description cd, categories c where c.parent_id = '0' and c.categories_status = '1' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order

 

 

Any help would be really useful.

 

Thanks

Share this post


Link to post
Share on other sites

Hi, just a quick question. I have not looked at this contribution for a while and have forgotten how to change somethings. Really all I need to know now is how to increase the number of categories being shown on the index page. It is currently showing 9 categories on the index page but I would like to increase this so that it shows 12 categories but I can not remember where I change the code from 9 to 12.

 

Thanks for any help

 

Michael

Share this post


Link to post
Share on other sites

Hi, just a quick question. I have not looked at this contribution for a while and have forgotten how to change somethings. Really all I need to know now is how to increase the number of categories being shown on the index page. It is currently showing 9 categories on the index page but I would like to increase this so that it shows 12 categories but I can not remember where I change the code from 9 to 12.

 

Thanks for any help

 

Michael

 

Its fine, I have found the code in catalog/includes/modules/categories_images.php

 

Thanks

Share this post


Link to post
Share on other sites

Hi,

 

Firstly thanks for a great contribution, this really suited my needs perfectly.

 

I'm not sure if this is something I'm missing, but to set the size of my category images I'm using Admin -> Images -> Small Image Width/Height, however this is also controlling the size of my image in the product_info page. I want my pictures on the product_info page to be significantly larger than those I'm showing for the category images, however as they are both linked to the same admin option I can't make them independent of each others size. How would I go about doing this?

 

Sorry if this is something that is already covered in this support thread, I've tried to check through it but there are a lot of posts so I may have missed something.

 

Steve

Share this post


Link to post
Share on other sites

Hi,

 

Firstly thanks for a great contribution, this really suited my needs perfectly.

 

I'm not sure if this is something I'm missing, but to set the size of my category images I'm using Admin -> Images -> Small Image Width/Height, however this is also controlling the size of my image in the product_info page. I want my pictures on the product_info page to be significantly larger than those I'm showing for the category images, however as they are both linked to the same admin option I can't make them independent of each others size. How would I go about doing this?

 

Sorry if this is something that is already covered in this support thread, I've tried to check through it but there are a lot of posts so I may have missed something.

 

Steve

 

After going through a number of threads on the subject I've stumbled upon this contribution which solves my problem perfectly.

 

http://addons.oscommerce.com/info/6211

Share this post


Link to post
Share on other sites

The problem is that the Categories Images Box is using SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT when it really shouldn't be. Then again, those values should always be blank anyway. I'll fix this in the next release.

 

Thanks for reporting the bug.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi

 

I'm a newbie that needs a bit of help. How do I run the categories_images_box.sql file and ad it to my web server?

 

/Jesper

Share this post


Link to post
Share on other sites

Hi

 

First thank you for the contribution, it works great.

 

Not sure if it is a general question but here goes.

 

I wanted to have the "categories images box" on a page for itself in a layer under the index page and link to it from index, what I did was create a new page and copy the code from the index page and remove what I didn't want.

The question is, is there a better way to do this?

 

Kind regards

Jesper

Share this post


Link to post
Share on other sites

This Addon is for osCommerce 2.2x. It can be used with 2.3.x but there will be modifications needed. There is a 2.3.1 version included in the Modular Front Page addon. I suggest that you use that one.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi, I have just come to load this contribution and I have found that my stylesheet.css is completely different to the one you have said to compare.

 

I have also noticed that 2 stylesheets.css have been downloaded with the contribution, one is in the top folder with the install instructions etc and the other is in the catalog file, which is the correct one to use? I am guessing its the one in the catalog file.

 

If my style sheet is completely different to yours would I just add yours to the bottom of mine or is it more complicated than that?

 

Thanks

 

Michael

Share this post


Link to post
Share on other sites

Hi, I have just come to load this contribution and I have found that my stylesheet.css is completely different to the one you have said to compare.

 

I have also noticed that 2 stylesheets.css have been downloaded with the contribution, one is in the top folder with the install instructions etc and the other is in the catalog file, which is the correct one to use? I am guessing its the one in the catalog file.

 

If my style sheet is completely different to yours would I just add yours to the bottom of mine or is it more complicated than that?

 

Thanks

 

Michael

 

Its ok I have worked it out.

 

If anybody else wants to know the first stylesheet.css in the top folder is for the install.html instructions required to install this contribution.

 

The stylesheet you need to compare/amend for your store is in the catalog folder in the usual structure. The only piece of code which will need adding to your stylesheet.css is at the bottom of the contribution stylesheet.css which begins with:

 

/* Categories in the Categories Images box */

 

hope this helps someone

 

Michael

Edited by offie

Share this post


Link to post
Share on other sites

Hi

I took the pages from modular front page to include the categories image module to oscommerce 2.3

 

i did the follwoing:

1. changed the file name fp_... in modules/...

2. changed and did the same in files languages/...

the box shows up in my admin section but does not whow up in the shop front.

do u know what could b ethe problem

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now