X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   if command - help! (https://forum.x-cart.com/showthread.php?t=7505)

kumar 05-09-2004 06:20 AM

if command - help!
 
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!

kumar 05-09-2004 06:21 AM

Is there a way to use a "like" command instead of "eq"?

mikebo 05-09-2004 03:25 PM

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


All times are GMT -8. The time now is 06:02 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.