ALEXCNX Posted June 14, 2015 Share Posted June 14, 2015 Hello, I have created a main category and listed sub-categories (each with its own image) under it - see snapshot below: Now when I access a sub-category, the image featured at the top is the same as the one featured on the main category page - see snapshot below: Is there any way to have each sub-category comes with either just a text, or a long image that fits nicely at the top? Cheers! Link to comment Share on other sites More sharing options...
Krystian Podemski Posted June 14, 2015 Share Posted June 14, 2015 Unfortunately this is something "normal" for PrestaShop, there is no thumbnail and lead image for categories, of course there is workaround for this, for example you can upload wider images directly to for example /img/cat_wide/ID_CATEGORY.jpg and change category.tpl file to display {$img_ps_dir}cat_wide/{$category->id_category}.jpg, to do it you need to change this: <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}> to this: <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$img_ps_dir}cat_wide/{$category->id_category}.jpg) right center no-repeat; background-size:cover; min-height:HEIGHT_OF_YOUR_IMAGEpx;"{/if}> Link to comment Share on other sites More sharing options...
ALEXCNX Posted June 14, 2015 Author Share Posted June 14, 2015 Ok and thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now