| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If image exists... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() How do we do an if then statement in smarty such as...
Code:
I know this has to be pretty simple. Can anyone help? Funky? Thanks, John7 |
|||||||
#2
|
|||||||
|
|||||||
![]() Okay - there is not a standard smarty or xcart way of doing this but....
![]() first: create a new modifier file: modifier.file_exist.php and save it into your smarty plugins folder. Code:
Then in the template where you wish for the file check to be used: {assign var="file" value="the_image_check_for.gif"} {if $file|file_exists} [img]{$file}[/img] {else} Show another image {/if} That'll do it ![]()
__________________
ex x-cart guru ![]() |
|||||||
#3
|
|||||||
|
|||||||
![]() Awsome!!!
I'm going to go test it out now. I'll keep you posted on how this turns out! Thanks Funky!!! JoHn7 |
|||||||
#4
|
|||||||
|
|||||||
![]() It works!!! Perfectly!!!
Thanks so much!!! John7 |
|||||||
|
|||
X-Cart forums © 2001-2020
|