Jump to content

[Solved] Is this possible? I have been searching all day.


Guest DesignHaus42

Recommended Posts

Guest aritali

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

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

Guest aritali

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

Guest aritali

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...