Add subcategory image to Category page

Hi,



I guess I should preface this and say that I’m new to using CS-Cart.



I want to assign subcategory pages an image that will show up on the parent Category page. So far no luck. I thought that if I went into the subcategory page and added an image under the Images option this would do it, but that only adds the image to the Subcategory page and not the Parent as well.



I want to add an image to the Parent page so that the list of sub-pages isn’t just a list of links.



Thanks!!



-Anthony

Are you talking about Content Pages or Categories here? If categories, this is what you will need to do: Display subcategory images

I am talking about Categories. Thanks for the link. I read that and looking at my directories I don't have the my_changes/ or any of those subdirectories even though I have the My Changes addon enabled. If I manually added those directories would the system know to hook in and use the new settings in my_changes?

Yes, you need to create the my_changes directory, depending on your version of the software:



Professional:

/skins/your_skin/customer/addons/my_changes/

Ultimate:

/stores/#/skins/your_skin/customer/addons/my_changes/ where # is the store ID.

You should end up with the view.override.tpl file in this location:

In Professional:

/skins/your_skin/customer/addons/my_changes/hooks/categories/view.override.tpl

In Ultimate:

/stores/#/skins/your_skin/customer/addons/my_changes/hooks/categories/view.override.tpl

Thanks! I got it to work, sort of. It's showing placeholding images on the Category page for all of the SubCategories, even if I have an image assigned to a specific SubCategory page.

If you right-click and view the page source, is there an image referenced in the code and if so, does that image filepath exist?

The img src for the placeholders is [font=monospace][size=1]src[/size][/font][color=#881280][font=monospace][size=1]=“[/size][/font][/color]/images/no_image.gif[color=#881280][font=monospace][size=1]” [/size][/font][/color][font=monospace][size=1]but if I click through to the SubCategory, the img src is [/size][/font][color=#000000][font=Consolas,]src[/font][/color][color=#000000][font=Consolas,]=“[/font][/color]/images/thumbnails/0/120/L45397-Candle_Centerpiece_Jar1360792266511c0acacf5d3.jpg[color=#000000][font=Consolas,]”[/font][/color] which is the image that should be showing on the Category page.

Which version of CS-Cart are you using? Are you using a custom template or one of the templates supplied with CS-Cart?

Latest version 3.x

whats your url of the site can you list it ?

The site is still in development but the IP is http://216.246.90.214



It requires an account to access the site, you can use a dummy that I set up:

U: test@test.com

P: password

Did you upload the image to the detailed image path or straight to the thumbnail section…though it may be you missed something doing the my_changes addon for sub cat multicolumns with images.



John

[quote name='johnbol1' timestamp='1360871764' post='155318']

Did you upload the image to the detailed image path or straight to the thumbnail section…though it may be you missed something doing the my_changes addon for sub cat multicolumns with images.



John

[/quote]

Simple way to test would be to add a line inside the

, outwith and {if} looks, such as

CAN YOU SEE THIS?!

in the categories.override.tpl - if it generates on the frontend, your problem is the category images.

John - The images are in the images/details/ directory.



I've also done SB's suggestion and added a “HELLO!!” in the code and that was rendered properly, above where the images should be. Here's were I entered it into the code:



{foreach from=$scats item=“category”}

{if $category}

HELLO!!!



$category.category_id”|fn_url}”>{include file=“common_templates/image.tpl” show_detailed_link=false object_type=“subcategory” images=$category.main_pair no_ids=true class=“cm-thumbnails” show_thumbnail=“Y” image_width=$settings.Thumbnails.category_lists_thumbnail_width image_height=$settings.Thumbnails.category_lists_thumbnail_height}



{else}

 

{/if}

{/foreach}

The category images should be in /images/thumbnails/X/X/X/filename.jpg



The /images/detailed/ files are for the enlarged product image, ie. when you click on the product image from the product page.

I checked and there was an images/thumbnails/images/85/ directory that only had the no_image.gif in it. I manually copied all of the images into the directory. Still nothing, even after clearing the cache in the broswer and in CS-Cart…

Are your file and folder permissions all correct? /images/ and subfolders should be 777. Check your permissions are OK and then delete the image from the category, then re-insert it. Does it work then?

Thanks so much for all your help!! With your help I was able to figure out what was going on. One of those dumb things I overlooked… everything was correct, but I was writing to addons > my_changes > controllers > customers folder instead of “customer”. Thanks again…