♥kymation Posted June 23, 2009 Author Share Posted June 23, 2009 I've done this at one site where the text is all linked. The owner wants it that way. I can never guess which way people will want things like this. No matter how many options I put in, there's always one more. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Guest Posted June 26, 2009 Share Posted June 26, 2009 Hi First off great mod, thanks a lot! I have found an error in the catalog/includes/modules/categories_images.php file though that I thought you should be aware of. When you display text on the last install - V1.2.11 it tries to link to product_info.php instead of index.php the links work fine on the images so to get the text links to work change line 163 from $info_box_text .= '<a href="' . tep_href_link (FILENAME_PRODUCT_INFO, 'cPath=' . $category['id']) . '">'; to $info_box_text .= '<a href="' . tep_href_link (FILENAME_DEFAULT, 'cPath=' . $category['id']) . '">'; I hope this helps people out, could someone add this update to the contribution page as an update? I dont have an account for it and i'm in the middle of a site build! Cheers! Quote Link to comment Share on other sites More sharing options...
eyal_barouk Posted June 26, 2009 Share Posted June 26, 2009 Hi First off great mod, thanks a lot! I have found an error in the catalog/includes/modules/categories_images.php file though that I thought you should be aware of. Thank you matthell, I have installed your solution, but not sure what the problem was, and what it came to solve :-) Can anyone explain? I don't see any noticeable change in my Category Images behaviour. No disrespect, but I would like to know if the author approves of this fix. Thank you, Quote Eyal How About an Open Source Car? Link to comment Share on other sites More sharing options...
Guest Posted June 26, 2009 Share Posted June 26, 2009 Hi Eyal Basically what I found was that the text description of the categories were not linking correctly and this was because it was calling on the product_info.php file instead of the index.php file. The images link above the text link in the code calls to index.php 'default' so I have changed the text category links to reference the index.php instead of the product_info.php which on my site caused nothing to show up and a 'product not found' error to appear. I hope this explains it a bit better, I'm not a master coder so I could be wrong on this one but it seems to work fine for me and has fixed the problem on my site. Matt Quote Link to comment Share on other sites More sharing options...
♥kymation Posted June 26, 2009 Author Share Posted June 26, 2009 Yes, this is a real bug. However, it affects only the Product Name link if you are in Row mode, so you would not see it if your settings don't use that line. I'll upload a new release as soon as I can. Thanks to Matthew for pointing out this error. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
MarcelN Posted June 27, 2009 Share Posted June 27, 2009 got a small problem: BOX_HEADING_CATEGORIES_IMAGES is shown as title on the categories box on my index.php. may this be related to the language used? i use german for my shop. do i have to modify something in the german files? if yes, what exactly? thanks in advance and great contribution! Quote Link to comment Share on other sites More sharing options...
♥kymation Posted June 27, 2009 Author Share Posted June 27, 2009 Yes, that's a language problem. I am not competent to translate the text to German, so I didn't do it. You will need to take the additional defines from the English language files in the distribution, copy them into the equivalent files in the German section, then translate them. When you get this done, could you please add them to the distribution, or give them to me so I can do that. That's the only way I'm going to get this translated. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
MarcelN Posted June 28, 2009 Share Posted June 28, 2009 changed in german.php: // Categories images box define('BOX_HEADING_CATEGORIES_IMAGES',' Kategorien'); i guess theres nothing elsethat needs to be updated, works fine now :D Quote Link to comment Share on other sites More sharing options...
offie Posted July 2, 2009 Share Posted July 2, 2009 Hi Kymation, great contribution. I have seen your latest update on the 26 June 2009. Does this update include the "Some corrections for the SQL file" uploaded by Teochris on the 17 June 2009? Is this correction required as I previously used this contribution on my new store in May 2009 using v1.1 without any errors and I am about to add it to my old store using the latest version? Thanks Michael Quote Link to comment Share on other sites More sharing options...
teochris Posted July 2, 2009 Share Posted July 2, 2009 Hi Kymation, great contribution. I have seen your latest update on the 26 June 2009. Does this update include the "Some corrections for the SQL file" uploaded by Teochris on the 17 June 2009? Is this correction required as I previously used this contribution on my new store in May 2009 using v1.1 without any errors and I am about to add it to my old store using the latest version? Thanks Michael The newest version includes the small sql fixes! Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted July 8, 2009 Share Posted July 8, 2009 Hi Jim, I had your wonderful contribution installed and working great - even with header tags and SEO contributions - then got into a mess on Order Editor contribution and had to install a backup version back to my server. (home directory and SQL database) Now I find that although the previously added boxes in my store have the correct pictures in them, and the admin area has the option to change the configurations for cat image boxes, the box to upload the pictures in my Admin - catalog - categories area is not there now ?? All I have is the "category image" selection but no "category image box" selection - any idea what code in what file I have corrupted? I have tried comparing the files with winmerge - but can't see any differences Im confused and my site is now live and I need to add some images ASAP. Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
MarcelN Posted July 8, 2009 Share Posted July 8, 2009 (edited) how can i edit the sizes of the images shown in the box on index.php? they are resized and look pretty bad because they use the values of SMALL_IMAGE width and height. is there any way I can change that? Cause Width is OK, but height is not. EDIT: and I cannot change the sizes of SMALL_IMAGE cause that would ruin all the images using those values. Edited July 8, 2009 by MarcelN Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 9, 2009 Author Share Posted July 9, 2009 In catalog/includes/modules/categories_images.php, change (Lines 60, 115, and 159) the constants SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT to whatever you want. I suggest that you set the height to a numeric value and set the width to blank in the Admin (or replace the constant with '' here.) You could also set the width and leave the height blank, but constant height usually looks better. Or you could make all of your images the same size by resizing and padding them to the same dimensions. Whatever you want. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
MarcelN Posted July 9, 2009 Share Posted July 9, 2009 how exactly does the code have to look like i have to set? i tried adding 1. SMALL_IMAGE_WIDTH="25" and so on 2. WIDTH="25" and so on Example: $info_box_text .= tep_image (DIR_WS_IMAGES . $category['image'], $category['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="2" vspace="3"'); $info_box_text .= tep_image (DIR_WS_IMAGES . $category['image'], $category['name'], 'WIDTH="25" HEIGHT="25"', 'hspace="2" vspace="3"'); but both only lead to one result: http://marcelniggemann.bplaced.net/catalog...s/Unbenannt.JPG thats what happens if i change the values. but if i change the SMALL_IMAGE_WIDTH and HEIGHT, the product images in the boxes will look blurred, so i dont want to change that value (of course it would kick this problem outta the world, but create another one) Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 9, 2009 Author Share Posted July 9, 2009 No, replace the SMALL_IMAGE_HEIGHT with a number, e.g. 75. You can put it in quotes '75' if you want. It'll work the same either way. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
MarcelN Posted July 10, 2009 Share Posted July 10, 2009 thx, that worked :) Quote Link to comment Share on other sites More sharing options...
fizi Posted July 17, 2009 Share Posted July 17, 2009 Please helpHome Photos you will not be publishedSee!ERROR Quote Link to comment Share on other sites More sharing options...
fizi Posted July 17, 2009 Share Posted July 17, 2009 Please help Home Photos you will not be published See! Visit My Website Quote Link to comment Share on other sites More sharing options...
teochris Posted July 17, 2009 Share Posted July 17, 2009 Please help Home Photos you will not be published See! ERROR Seems chinese to me! But probably you have done something wrong while installing repeat carefully all steps Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 17, 2009 Author Share Posted July 17, 2009 Did you upload any images? Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
eyal_barouk Posted July 17, 2009 Share Posted July 17, 2009 Hi, I have it installed and running - I love it. very nice! I'm having trouble using this contribution along with the excellent Header tags SEO module http://addons.oscommerce.com/info/5851/v,22 Mainly (but not sure) in admin/categories.php After installing both contributions I get the code around line 976: if (isset($HTTP_GET_VARS['search'])) { $search = tep_db_prepare_input($HTTP_GET_VARS['search']); /*** Begin Header Tags SEO ***/ /* $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name"); } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name"); /*** End Header Tags SEO ***/ // Categories images box $categories_query = tep_db_query("select c.categories_id, cd.categories_name, cd.categories_description_front, c.categories_image, c.categories_image_front, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name"); } else { // Categories images box $categories_query = tep_db_query("select c.categories_id, cd.categories_name, cd.categories_description_front, c.categories_image, c.categories_image_front, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name"); } In this state I get an error about the "else" command being out of place. I have ended up //unmarking the Header Tags SEO part in these lines. Is there a solution for this? Thanks you, Eyal Quote Eyal How About an Open Source Car? Link to comment Share on other sites More sharing options...
♥kymation Posted July 17, 2009 Author Share Posted July 17, 2009 You can't just duplicate that code and expect it to work. You have to merge the changes in each line into the original code. Take the Contributions one at a time and compare the changes to the original code, then make the changes in your copy. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
eyal_barouk Posted July 17, 2009 Share Posted July 17, 2009 (edited) You can't just duplicate that code and expect it to work. You have to merge the changes in each line into the original code. Take the Contributions one at a time and compare the changes to the original code, then make the changes in your copy. Regards Jim Hi Jim, thank you for this quick reply. I did take it one at a time and I only got stuck in this part. I found that, on the part I have posted, (Removed?) that each contribution works fine on it's own but not together. I have to admit that I gave up after a short struggle - I didn't want to mess up the code not being sure exactly what it does; plus, I thought maybe some one else got this problem and so maybe an official solution might be posted to the community benefit. My Problem is not a critical because I don't update the tags from the category section anyway. Just wondered for perfection sake. Edited July 17, 2009 by eyal_barouk Quote Eyal How About an Open Source Car? Link to comment Share on other sites More sharing options...
♥kymation Posted July 17, 2009 Author Share Posted July 17, 2009 You just need to compare each line to the stock osCommerce and see what is added. Header Tags adds cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description, so far as I recall. Thee could be more. The Categories Images Box adds c.categories_image_front, to the same SQL. So all you have to do is add both of those strings. I recommend a good file comparison program (Winmerge, Windiff, Beyond Compare, etc.) to aid in this. It helps a lot to have all of the differences highlighted for you. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
eyal_barouk Posted July 17, 2009 Share Posted July 17, 2009 You just need to compare each line to the stock osCommerce and see what is added. Header Tags adds cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description, so far as I recall. Thee could be more. The Categories Images Box adds c.categories_image_front, to the same SQL. Regards Jim Got them to work together! It was actually pretty easy once I started reading the code instead of blindly bulk copy/paste it as I did with all the other contributions I have installed. Thank you so much for your help. Quote Eyal How About an Open Source Car? 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.