Jump to content

Do Not Want Images to Show


Recommended Posts

go to related page themes file (.tpl), find the block of code for displaying image,
then add attribute as following to the outter HTML tag.

style="display:none"



if you want only show some product, you can use product ID to do that, the code will become something like

style="display:{if $product['id_proudct'] == X or if $product['id_proudct'] == Y}{else}none{/if}"



About code is used for those product are loaded with list, like home featured, category, search result and so on.


Below code is used for $product loaded with object like in product detail page.

style="display:{if $producrt->id == X or if $producrt->id == Y}{else}none{/if}"




where X, Y is product ID that you want image displayed.

Link to comment
Share on other sites

You can do is in a much cleaner way, and from the backoffice interface.
Pick a product field you do not use (IE location or supplier reference), depending on what you have more of, products to show or products not to show, mark the field you want with a number (IE 1).

Assuming you mark all the ones you want to show and use {if $product->location == '1'}..........{/if} to show or hide the images.

I suggest you do not use Style="display:none" as the images would still be very easily shown using firebug.

Link to comment
Share on other sites

×
×
  • Create New...