![]() |
If Satatement to remove Images
I am looking to remove the thumbnail images from the Products listing. I only want the images removed if the category is "126" and the product is assigned to a manufacturer.
I have many products that are assigned to categories other that cat 126 and are not assigned to a manufacturer. For these products, I want the thumbnail to show. I have added the following to the products_list.tpl. but it does not seem to work. {if $cat != '126'|| $manufacturers[id].manufacturer == '0' } <a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a> {/if} Thank you. |
Re: If Satatement to remove Images
It appears your code will do the opposite of what you want, it should display the thumbnail. To test this, just temporarily add some text to the "if" statement...
{if $cat != '126'|| $manufacturers[id].manufacturer == '0' } TEST <a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a> {/if} |
Re: If Satatement to remove Images
Thank you. I will give it a try.
|
Re: If Satatement to remove Images
Try this...
{if $cat != '126'|| $manufacturers[id].manufacturer == '0' } TEST {else} <a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a> {/if} If all you see for cat #126 is "TEST" then you know the code works. You can replace "TEST" with whatever you want to do with cat #126 instead of displaying the thumbnail. |
Re: If Satatement to remove Images
Thank you sir.
Much appreciated. |
All times are GMT -8. The time now is 11:10 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.