Guest aritali Posted May 11, 2011 Share Posted May 11, 2011 Ok, first time poster long time reader...I was wondering if this was possible. I have a category of products that don't need images, is it possible to disable images just on one category? Not uploading images gives me the broken image icon, so that is out.thanks Link to comment Share on other sites More sharing options...
shokinro Posted May 12, 2011 Share Posted May 12, 2011 I think it is possible to do that, but it will needs to change some code in the theme file (product.tpl)also one thing is that you needs to adjust the layout.You can put embrace the code section for displaying image with following statement. {if $product->id_category_default == X} .... code for displaying images .... {/if} above X is the ID of your category Link to comment Share on other sites More sharing options...
Guest aritali Posted May 12, 2011 Share Posted May 12, 2011 Thanks for the fast reply. It works, but it works too good. It doesn't display images for any of the products. This is what I have. {if $product->id_category_default == 4} getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> {/if} I figure it is with using the catagory number, but I can't figure out how to print the variable $product->id_category_default to see what it is or what format it is using. I have {print $product->id_category_default} But it escapes the program when it comes to it. Any thoughts on what I should be putting to print it? Link to comment Share on other sites More sharing options...
shokinro Posted May 12, 2011 Share Posted May 12, 2011 {$product->id_category_default} Just remove the print, it will display the default category id Link to comment Share on other sites More sharing options...
Guest aritali Posted May 12, 2011 Share Posted May 12, 2011 Ahh, you are a life saver. What I actually needed was $category->id but you gave me the nudge I needed to negate a days worth of fiddling around. thanks so much Link to comment Share on other sites More sharing options...
shokinro Posted May 12, 2011 Share Posted May 12, 2011 I am glad you solved the problem.Please mark it as solved by editing your first post and click "Mark is as solved". 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