Wijn & Olijfolie Posted October 29, 2010 Posted October 29, 2010 Hello,I’ve a problem with my prestashop. I have many categories and subcategories within these categories.The problem is that if i did not add an image to an subcategorie (a car) you’ll always see the “No image available”. But I dont want this, I want the subcategories (cars) to view under eachother.What i mean is this:This is te situatian at the moment:http://autovloeistof.nl/screenshots/huidig.JPGAnd I want this:http://autovloeistof.nl/screenshots/doel.JPG Share this post Link to post Share on other sites More sharing options...
rocky Posted October 30, 2010 Posted October 30, 2010 To remove the subcategory images, change lines 37-44 of category.tpl (in PrestaShop v1.3.1) from: <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" /> {/if} to: {*<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" /> {/if} *} That will make just the subcategory names appear horizontally. To make them vertical, you will need to change the /* category.tpl */ section on line 1402 of global.css from: /* category.tpl */ h2.category_title { font-size: 1.3em } body#category #subcategories li { margin-right: 10px } div.cat_desc { margin: 0 1em } body#category div#subcategories ul.inline_list li a img { display: inline } to something like: /* category.tpl */ h2.category_title { font-size: 1.3em } body#category #subcategories li { margin-right: 10px; display: block } div.cat_desc { margin: 0 1em } body#category #subcategories { text-align: center } Share this post Link to post Share on other sites More sharing options...
Wijn & Olijfolie Posted October 30, 2010 Posted October 30, 2010 Thank you for the answer, but it's not quite accurate from what I had in mind, I meant the following.I have one main subcatgory, this is a subcategory with many car brands:http://www.autovloeistof.nl/screenshots/carbrands_main_subcategory.JPGWithin this subcategory I've the 2nd subcategory, where you can choose between gasoline or diesel:http://www.autovloeistof.nl/screenshots/carbrands_2nd_subcategory.JPGAnd within this subcategory I've the 3rd subcategory where you can choose the specific car:http://www.autovloeistof.nl/screenshots/carbrands_3rd_subcategory.JPGIn this 3rd subcategory i want to display only text without the annoying image "No image available"http://autovloeistof.nl/screenshots/doel.JPG Share this post Link to post Share on other sites More sharing options...
rocky Posted October 31, 2010 Posted October 31, 2010 In that case, change lines 37-44 of category.tpl (in PrestaShop v1.3.1) from: <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" /> {/if} to: <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"{if $subcategory.id_image} class="no-image"{/if}> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {* {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" />*} {/if} *} And the /* category.tpl */ section on line 1402 of global.css from: /* category.tpl */ h2.category_title { font-size: 1.3em } body#category #subcategories li { margin-right: 10px } div.cat_desc { margin: 0 1em } body#category div#subcategories ul.inline_list li a img { display: inline } to something like: /* category.tpl */ h2.category_title { font-size: 1.3em } body#category #subcategories li { margin-right: 10px } body#category #subcategories a.no-image { display: block; text-align: center } div.cat_desc { margin: 0 1em } Share this post Link to post Share on other sites More sharing options...
aimrob Posted February 1, 2011 Posted February 1, 2011 Hi! I would also like to remove the "no image available" image unless I have uploaded an image for a product. Can you please give me the code needed for version 1.3.6.0 that will allow me to make this happen? I would really appreciate it. Also, the product.tpl file, is that the file located in the /themes/prestashop file?Thank you,Amy Share this post Link to post 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