diggy Posted March 13, 2012 Share Posted March 13, 2012 Hello, On this page http://www.dgeneral.ch/TheStreetMag/2-musique-ipods, I would like per exemple to hide the picture of the subcategory. How can I do it? I would like that my users only user the left menu. Thanks in advance Link to comment Share on other sites More sharing options...
pb4sc Posted March 13, 2012 Share Posted March 13, 2012 Hi, Go to the category, then the products in that category. Delete the image to get rid of the image, or delete the product. If you only want to delete the sub category image, go to the category, then under category, find the sub category. Click on the pencil, and delete the image. Hope this helps. pb4sc Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Share Posted June 1, 2012 you wil still see an image that says no image available...how do u remove that? Link to comment Share on other sites More sharing options...
jhnstcks Posted June 1, 2012 Share Posted June 1, 2012 You need to edit the category.tpl file and delete the following section of code {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Share Posted June 1, 2012 Thanks a lot !! Link to comment Share on other sites More sharing options...
alexandrasanax Posted January 15, 2014 Share Posted January 15, 2014 Hi, I used that code, and it does remove the image, but now I get a big QUESTION MARK image. How do I get rid of that question mark image? I use prestashop 1.5.4.1 Link to comment Share on other sites More sharing options...
vekia Posted January 15, 2014 Share Posted January 15, 2014 it's because (probably) you use this code: {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} Link to comment Share on other sites More sharing options...
Ronman Posted February 11, 2014 Share Posted February 11, 2014 (edited) I solved the problem in the following manner.Look above to remove. Subcategory photoNow a picture emerges with "no picture available"Search the root - img folder to C - en-default-medium_default.jpgThis is the no-picture available.jpgLoad this photo in Photoshop (or another graphics program) and make this photo completely white.Now go to the themes folder to your own theme and choose the css folderHere is a file named categorie.css make the border from the inline_list li img 0pxin this way:. inline_list li img {border: 0px solid # ccc The advantage of this method is that you don't need to adjust php code and if you still want a single subcat picture you just Enable this picture and it will will appear, just as the other fields are blank. regards,Ronny Edited February 11, 2014 by Ronman (see edit history) 1 Link to comment Share on other sites More sharing options...
Linkarta Posted March 14, 2014 Share Posted March 14, 2014 Hello Guys, i have the same issue but on the other way around, i've deleted the image of category (actually my developer ) and now i want to have them again, but i don't know which code i have to re-write again? my store is here, Linkarta.ae Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 Hello Guys, i have the same issue but on the other way around, i've deleted the image of category (actually my developer ) and now i want to have them again, but i don't know which code i have to re-write again? my store is here, Linkarta.ae just add this code: {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} to your category.tpl file there where you want to display image. Link to comment Share on other sites More sharing options...
Linkarta Posted March 14, 2014 Share Posted March 14, 2014 Thanks Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 Thanks so, you inserted it to your tpl file, and now image appears correctly? Link to comment Share on other sites More sharing options...
Linkarta Posted March 15, 2014 Share Posted March 15, 2014 not really, i got question mark, for all subcategories, but when I'm adding an image inn the html box of category, it;s not replacing the question mark for some reason what i wanted on the first place, that i assign an image for one category only (Mother's Day Cat), but i got ? on all, so i switched off all Link to comment Share on other sites More sharing options...
Linkarta Posted March 15, 2014 Share Posted March 15, 2014 this is how my t/l file look like starting line 26 {include file="$tpl_dir./errors.tpl"} {if isset($category)} {if $category->id AND $category->active} {if $scenes || $category->description || $category->id_image} <div class="content_scene_cat"> {if $scenes} <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {else} <!-- Category image --> {/if} {if $category->description && 0 == 1} <div class="cat_desc"> {if strlen($category->description) > 120} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" style="display:none;">{$category->description}</div> <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} </div> {/if} {if isset($subcategories) && 0 == 1} <!-- Subcategories --> <div id="subcategories"> {literal}<!--<h3 class="title_block"><span>{l s='Subcategories'}</span></h3>-->{/literal} <div class="inline_list"> {foreach from=$subcategories item=subcategory name=subcategories} {if $subcategory@iteration%4==1} <div class="row-fluid"> {/if} <div class="span3 subcategories"> <div class="subcategories-container clearfix"> <div class="img_subcate"> {*<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcat_default')|escape:'html'}" alt=""/> {else} <img src="{$img_cat_dir}default-subcat_default.jpg" alt="" /> {/if} </a>*} </div> <div class="right_block"> <h3 class="s_title_block"><a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a></h3> {if $subcategory.description} <div class="cat_desc">{$subcategory.description}</div> {/if} </div> </div> </div> {if $subcategory@iteration%4==0||$smarty.foreach.subcategories.last} </div> {/if} {/foreach} </div> </div> {/if} <h1 class="title_category"> {strip} {$category->name|escape:'htmlall':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'htmlall':'UTF-8'} {/if} {/strip} <span class="resumecat category-product-count"> / {include file="$tpl_dir./category-count.tpl"} </span> </h1> {if $products} <div class="content_sortPagiBar"> <div class="row-fluid sortPagiBar"> <div class="span2 hidden-phone"> <div class="inner pull-left"> <span class="title_view hidden-phone">{l s='View'} </span> <div class="btn-group" id="productsview"> <a class="leo_btn last" href="#" rel="view-grid"><i class="icon-th active"></i></a> <a class="leo_btn first" href="#" rel="view-list"><i class="icon-th-list"></i></a> </div> </div> </div> <div class="span8 hidden-phone"> <div class="inner"> {include file="./product-sort.tpl"} </div> </div> <div class="span2"><div class="inner"> {include file="./product-compare.tpl"} </div></div> </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar bottom-compare"> <div class="sortPagiBar clearfix row-fluid"> {include file="$tpl_dir./pagination.tpl" paginationId='bottom'} <div class="span4"> <div class="inner"> {include file="./nbr-product-page.tpl" paginationId='bottom'} </div> </div> <div class="span2 pull-right"> <div class="inner"> {include file="./product-compare.tpl" paginationId='bottom'} </div> </div> </div> </div> {/if} {elseif $category->id} <p class="warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 please go to preferences > images tab in your back office does the imagetype named 'medium' exist on list? Link to comment Share on other sites More sharing options...
Linkarta Posted March 15, 2014 Share Posted March 15, 2014 yes, it does exist, all on except "Scenes" Link to comment Share on other sites More sharing options...
smallbizwiz Posted May 27, 2014 Share Posted May 27, 2014 I solved the problem in the following manner. Look above to remove. Subcategory photo Now a picture emerges with "no picture available" Search the root - img folder to C - en-default-medium_default.jpg This is the no-picture available.jpg Load this photo in Photoshop (or another graphics program) and make this photo completely white. Now go to the themes folder to your own theme and choose the css folder Here is a file named categorie.css make the border from the inline_list li img 0px in this way: . inline_list li img { border: 0px solid # ccc The advantage of this method is that you don't need to adjust php code and if you still want a single subcat picture you just Enable this picture and it will will appear, just as the other fields are blank. regards, Ronny Clever solution...do you have any idea why you would every want that "No Image Available" to show up? Why would PrestaShop add it in the first place? 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