dixie Posted July 24, 2010 Share Posted July 24, 2010 I would like the small images of my subcategories to show, but how do I make it so the main category image does NOT show when I go to view the products in that category? When I click on a subcategory, I would like to go directly to viewing the products in that category, without a category image at the top of the page. I will explain further if necessary. Thank you for any help you can provide. Link to comment Share on other sites More sharing options...
tomerg3 Posted July 24, 2010 Share Posted July 24, 2010 Edit /themes/prestashop/category.tpl and remove the following code (you may want to keep a backup just in case) {if $scenes} <!-- Scenes --> {include file=$tpl_dir./scenes.tpl scenes=$scenes} {else} <!-- Category image --> {if $category->id_image} getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} {/if} Link to comment Share on other sites More sharing options...
dixie Posted July 24, 2010 Author Share Posted July 24, 2010 I did a backup, as you suggested, and deleted the text. It worked perfectly. Thank you very much for your help! Link to comment Share on other sites More sharing options...
JQuiroga Posted January 3, 2011 Share Posted January 3, 2011 Hi, I have the same issue...I also want the image of the subcategory not to be shown when you go to that subcategory (subcategory page), if I delete the lines mentioned before in category.tpl this will apply for everything, even if you just have categories... how to make this work ONLY if a category has subcategories ??Thank you! Link to comment Share on other sites More sharing options...
tomerg3 Posted January 4, 2011 Share Posted January 4, 2011 Change it to {if $scenes} <!-- Scenes --> {include file=$tpl_dir./scenes.tpl scenes=$scenes} {elseif !isset($subcategories)} <!-- Category image --> {if $category->id_image} getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} {/if} Link to comment Share on other sites More sharing options...
JQuiroga Posted January 5, 2011 Share Posted January 5, 2011 Thank you very much for your fast response...it didn't work, but I saw that the code is a little bit different, I'm using 1.3.3, sorry I didn't mentioned before, but I found another topic with the same issue with the following solutionat category.tpl change the line #22 from:{if $category->id_image}- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - to:{if $category->id_image && $category->level_depth == 1}And in case you don't want the text "There is no product" to appear after the Category name in situations wich you have Subcategories with products, change the following:at category.tpl change the block around line #5from: {strip} {$category->name|escape:'htmlall':'UTF-8'} {if $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if}{/strip} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - to:{strip} {$category->name|escape:'htmlall':'UTF-8'} {if $nb_products > 0} {if $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} {/if}{/strip} Link to comment Share on other sites More sharing options...
NioGio Posted November 1, 2014 Share Posted November 1, 2014 I had already figured out how to swap out the main category image for an image in the description field....my question is....how to get it to re-size in a responsive theme? (default_bootstrap) 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