Subcategory Thumbnails Addon With SEO for 2.1.1

Babalucci came up with this addon a while back and I upgraded it to 2.1.1. The first upgrade I did made it so the SEO names wouldn’t work.



This version makes it so the SEO names work for the subcategories.



The instructions and files are in the zip. Everything is pretty easy. Just copy over the files and install the addon.



You can see a demo at [url]http://www.jandkonline.com/testsite[/url] Not all the categories have images, but you should be able to get the idea.



Hope you like it.



Brandon

subcat_thumbs.zip

Brandon,



Thanks for posting this and thanks to Babalucci for coding it. Il get this up and running straight away as it looks much nicer than the text only links.



Regards,

Aleks

[quote name=‘AleksB’]Brandon,



Thanks for posting this and thanks to Babalucci for coding it. Il get this up and running straight away as it looks much nicer than the text only links.



Regards,

Aleks[/quote]



Bows Thank you Brandon - Something I was planning to code myself - Appreciate the efforts!

Brandononvd and Babalucci-

Thank you so much for your work on this. It works great with one exception that I haven’t figured out yet. When you are inside the subcategory and using the “View as List” viewing option(which is how I want my products to be displayed by default), the subcategory image messes up my product margins all the way down the page. I don’t know if that makes sense, but I’ve minimized the look by changing to “View as Products Grid” .

If you look at the link I’ve provided, you will see what I’m talking about if you change to the “View as List”.

[url]http://best-planet.com/pond-water-treatments/water-testing-kits.html[/url]

Any help you can provide would be greatly appreciated. You’ve help me out tremendously already!

Carol

I removed that image, but will have to check how I did it and get back to you. I dont need it sitting right on the cat page but still needed it in the cat list pages.



John

I would appreciate it John!

Thank you!

Carol;)

Carol,



Could you please explain a little bit more about what you mean.



Unfortunately, when I look at the site in any of the viewing options everything looks great to me.



I checked in both IE 8 and FF 3.6.12



What image are you talking about anyways? Do you mean the category image? If you want to remove the image just.



1.) Remove:



In var/skins_repository/base/customer/addons/subcat_thumbs/hooks/categories/view.override.tpl


{if $category_data.main_pair}


{include file="common_templates/image.tpl" show_detailed_link=true images=$category_data.main_pair object_type="detailed_category" no_ids=true class="cm-thumbnails" show_thumbnail="Y" image_width=$settings.Thumbnails.category_details_thumbnail_width image_height=$settings.Thumbnails.category_details_thumbnail_height}


{if $category_data.main_pair.detailed_id}
{include file="common_templates/previewer.tpl"}
{/if}

{/if}




2.) In Admin => Administration => Addons



Uninstall the subcat thumbs addon



3.) In Admin => Administration => Addons



Install the subcat thumbs addon



The problem with doing this is that none of your category images will show up on top. Your subcategory images will still show, but not the one assigned to that category. (I hope that makes sense)



If you still want to have some type of image or description, add the image in the category description part of the categories admin in your admin panel.



If none of that helps, maybe after you clarify a little bit more I’ll have a better understanding of what you want.



Brandon

You know what, Brandonvd-

It’s fine now. And I didn’t change anything since I posted that issue. I can’t explain why it changed or why it was that way to begin with. But, for some reason, it’s fine now.

Thank you for replying and thank you for sharing this add on! I love it! It’s exactly what I wanted for my site. :wink:

Carol

You’re welcome Carol and Jesse.



Did you clear your cache or anything? This would have made everything come up right.



I’m glad it is working the way you want it. When I took a look at your site I just couldn’t figure out what was wrong. I’m glad it wasn’t just me being dumb.



Brandon

You know Brandonvd, the only thing I have noticed (that is probably totally coincidental) that seems to make changes take effect is viewing in different web browsers and of course clearing the cache. Sometimes it seems it takes up to 20 minutes for some of my changes to take effect.

I’m still very new to this so I’m only speculating.

Thanks again!

Carol

[quote name=‘brandonvd’]Carol,



Could you please explain a little bit more about what you mean.



Unfortunately, when I look at the site in any of the viewing options everything looks great to me.



I checked in both IE 8 and FF 3.6.12



What image are you talking about anyways? Do you mean the category image? If you want to remove the image just.



1.) Remove:



In var/skins_repository/base/customer/addons/subcat_thumbs/hooks/categories/view.override.tpl


{if $category_data.main_pair}


{include file="common_templates/image.tpl" show_detailed_link=true images=$category_data.main_pair object_type="detailed_category" no_ids=true class="cm-thumbnails" show_thumbnail="Y" image_width=$settings.Thumbnails.category_details_thumbnail_width image_height=$settings.Thumbnails.category_details_thumbnail_height}


{if $category_data.main_pair.detailed_id}
{include file="common_templates/previewer.tpl"}
{/if}

{/if}




2.) In Admin => Administration => Addons



Uninstall the subcat thumbs addon



3.) In Admin => Administration => Addons



Install the subcat thumbs addon



The problem with doing this is that none of your category images will show up on top. Your subcategory images will still show, but not the one assigned to that category. (I hope that makes sense)



If you still want to have some type of image or description, add the image in the category description part of the categories admin in your admin panel.



If none of that helps, maybe after you clarify a little bit more I’ll have a better understanding of what you want.



Brandon[/QUOTE]



Nice one Brandon,



thats exactly what I meant. At least someones on the ball :slight_smile:



John

Thank you Johnbol1. It’s greatly appreciated!

Carol:D

Yes Brandonvd-

That worked like a charm except I didn’t use the var directory. I used skin/mycurrentskin/customer/addons/my_changes/hooks/categories. The view.override.tpl file located in there is what I modified.

Just wanted to throw that out there so maybe someone else could benefit from it.

Thanks again,

Carol:D

Hi all



I’ve added this code manually (as the above post), it creates the layout etc correctly, but all my images on the sub category page just show the ‘no image’ gif, I had this same issue when I added the code from the original KB article.



I’ve tried manually adding a thumbnail and of course I’ve cleared the cache and also tried a different browser.



Thumbnails work correctly everywhere else including the actual category page.



Anyone have any suggestions?



Thanks



Lee

I’ve just tested on 2.1.2 on



Gives Alignment error with Firefox, works fine with IE



[url]http://d.pr/sNKG[/url]



tks

kogi

Just an update



I got round this by using a categories Block above the page content, this gave me the graphical list (manually added) then underneath a list of the categories, worked perfectly for me but in the end I changed my rang and now dont need it so no link im afraid,



Try adding a category block to the specific category page and add the sub categories manually



No editing of the core code then



Lee

[quote name=‘kogi’]I’ve just tested on 2.1.2 on



Gives Alignment error with Firefox, works fine with IE



[url]http://d.pr/sNKG[/url]



tks

kogi[/QUOTE]



Me to I have the same problem with firefox with alignment…

In IE and Crome is Ok.



Can anyone help as… thanks

I compared your files with the solution of:

CS-Cart Documentation — CS-Cart 4.15.x documentation



The code is identical, except for styles and classes in certain places. It seems that this is important, because your solution works fine and I still have problems with the display-subcategories-multicolumns solution.



One problem I had with both solutions was that with a deep hierarchy (cat-subcat-subcat-products) clicking on subcat images didn’t take me to that subcat. Instead, an image popup was presented.



Trying to solve another problem also solved this one. Suppose you don’t want the category image to appear on the page where subcategories are displayed. This was important to me because this messed up display on Firefox browsers.



To get this done, you comment out a certain section of view.override.tpl, like this:



{*
{if $category_data.main_pair}


{include file="common_templates/image.tpl" show_detailed_link=true images=$category_data.main_pair object_type="detailed_category" no_ids=true class="cm-thumbnails" show_thumbnail="Y" image_width=$settings.Thumbnails.category_details_thumbnail_width image_height=$settings.Thumbnails.category_details_thumbnail_height}


{if $category_data.main_pair.detailed_id}
{include file="common_templates/previewer.tpl"}
{/if}

{/if}
*}




When you do that, you solve the category image problem. The “image navigation” problem described above also disappears. I now have multicolumns, image navigation and no category image on its display page. Thank you for your implementation of subcat_thumbs!



Jerome.

I’m very new using cs cart so I apologize for not understanding.



I’m not sure what you mean when you say: Copy the files over. Do you mean to upload the folder called files? Where would I upload it too? Or open the files and upload the the addons as below?



Install the addon in Admin => Administration => Addons



javaguy, where in the view.override.tpl file do you add the code?

@Lime Rikee,



Inside the files folder there are two other folders. One is called addons and the other is called var. You also have those exact same folders on your server. All you are doing is just uploading and merging the folders.



Once the files are uploaded then you go into your admin and install the addon.



If you want to remove the image like Javaguy did, you should remove the code before you upload the files.



To get to view.override.tpl Go to:



var/skins_repository/base/customer/addons/subcat_thumbs/hooks/categories/view.override.tpl



Just edit the file before you upload and you should be all set.



Hope that helps,



Brandon