| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
Detailed Images greater than 1 conditional | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||
|
|||||||
|
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
__________________
Marc Boucher X-Cart Gold V4.0.18 (Mac OS X Server) |
|||||||
|
#2
|
|||||||||
|
|||||||||
|
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:
|
|||||||||
|
#3
|
|||||||
|
|||||||
|
Thanks I'll give it a try and let you know how it works.
__________________
Marc Boucher X-Cart Gold V4.0.18 (Mac OS X Server) |
|||||||
|
#4
|
|||||||||
|
|||||||||
|
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} |
|||||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||