[ic] Simple conditional problem

Ed LaFrance interchange-users@lists.akopia.com
Fri Jun 8 14:25:00 2001


At 06:59 PM 06/08/2001 +0100, you wrote:
>Hello
>
>Can anyone please help me with what is probably a very simple problem.  I am
>trying to use a conditional statement to not display the price for a gift
>certificate with in a loop
>
>[if [loop-code] =~ /^gift_cert/i]Available in any
>increment[else][loop-price][/else][/if]
>
>Obviously to those in the know, it doesn't work.  I've tried it with quotes,
>with nothing, probably 20 different combinations and still no joy.
>
>Thanks for whatever help you can provide
>

Check into [if explicit... in the tag ref.  You might also want to try 
[loop-calc] (execution is said to be faster):

[loop-calc]
         if ('[loop-code]' =~ /^gift_cert/i) {
                 return 'Available in any increment.';
         }
         else {
                 return '[loop-price]';
         }
[/loop-calc]



===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================