![]() |
Detailed Images greater than 1 conditional
Here's my question, I want to code a conditional that does the following action; if detailed images exist and is greater than 1 image show 'this' else show 'something else'. Can anyone help me with this language?
{section name=image loop=$images} {if $images[image] > ?? } this {else} something else {/if} {/section} Thanks Marc |
Re: Detailed Images greater than 1 conditional
This should work...however, I didn't test it, and it is late here.
add to modules/Detailed_Product_Images/product_images.php PHP Code:
Then add to your image template Code:
{if $image_check >= "2"} |
Re: Detailed Images greater than 1 conditional
Thanks I'll give it a try and let you know how it works.
|
Re: Detailed Images greater than 1 conditional
The following worked for us in v4.1.9
add to modules/Detailed_Product_Images/product_images.php # # Count Detail Images # $image_check = func_query_first_cell("SELECT count(imageid) FROM xcart_images_D WHERE id='$productid'"); $smarty->assign('image_check', $image_check); Usage: {if $image_check >= "X"} something to show here {else} something else to show here {/if} |
All times are GMT -8. The time now is 06:04 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.