[ic] Help printing a interchange variable (or whatever it's called)
Ed LaFrance
interchange-users@icdevgroup.org
Thu Jan 9 12:13:01 2003
At 12:04 AM 01/09/2003 -0500, you wrote:
>Hello all,
>
>I am trying to get some basics down with the ITL and am having little
>luck. I'm a very experience Perl programmer and am getting frustrated
>cause I'm not fully understanding the basics of the ITL.
>
>Here's an example - printing a variable....
>
>This code is in checkout.html
> [if-item-field weight]
> [seti weight][summary amount=`[item-quantity] * [item-field
>weight]`][/seti]
> [/if-item-field]
>
>Now, how do I get the *total* weight printed?
I believe this is demonstrated in the cart code, which is located at
yourcat/templates/components/cart. The [summary ..] tag has a parameter for
returning the accumulated value, which you should be able to see in
practice there.
> I know how to print each
>item's weight, I just write:
>
>[item-field weight]
>
>I've tried all sorts of things to get the weight variable in the "seti"
>tag to be printed. And yes, I do have the weight field with a valid
>value for all of the products in my database and I can get each of them
>to be printed with the product info, but I need a total of all products
>weight.
>
>I seriously have looked at all the documentation and am at a loss on
>several basic things like this....
>
>Can anyone provide syntax for a few basic features like printing
>variables (or whatever the interchange term is for something that holds
>a value), and other useful pieces that would make the ITL a little
>easier to get into?
>
>Any help would be appreciated!
>
>Thanks,
>Kevin
Kevin - examples of this are all over the foundation demo, plus you have
the Interchange tag reference at your disposal: take a look at the docs for
[value ..], [var ..], [scratch ..], [cgi ...] and [data ...], among others.
- Ed L.
===============================================================
New Media E.M.S. Technology 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
===============================================================