| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
if command - help! | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() If I have "ABCD" in param05, is there a way to display the following on the product page:
{if $product.param05 eq "A"}Color: Black{/if} {if $product.param05 eq "B"}Color: White{/if} {if $product.param05 eq "C"}Size: Big{/if} {if $product.param05 eq "D"}Size: Small{/if} etc... I tried the above, but it only recognizes the first character in the param05 field, and displays the data only for that. For example, if param05 has "AC", it should display "Color: Black Size: Big", but only displays "Color: Black" because "A" is the first character in param05. I think it has to do with the "eq" command. Please help! |
|||||||
#2
|
|||||||
|
|||||||
![]() Is there a way to use a "like" command instead of "eq"?
|
|||||||
#3
|
|||||||
|
|||||||
![]() Hi Kumar
I have this page bookmarked in my browser because I use it frequently. Hope it helps you. http://smarty.php.net/manual/en/language.function.if.php Mike
__________________
Mike X-Cart Gold Version 4.6.0 PHP 5.2.17 |
|||||||
|
|||
X-Cart forums © 2001-2020
|