[Zope] Finagling Around Strange Zope Quirk

Thomas B. Passin tpassin@mitretek.org
Mon, 7 Jan 2002 14:36:57 -0500


[Ben Ocean]

> I have a variable that is set thus:
> <dtml-call "REQUEST.set('shipping',_.int(subtotal)*.05)">
> and sent in a form thus:
> <input type=hidden name=shipping value=<dtml-var shipping>>
> where I would like it to be called thus:
> <dtml-var shipping fmt=dollars-and-cents>
> That doesn't work.

Yes, it does.  To be more precise, I tried this (making up a value for
subtotal):

<dtml-let subtotal="3.50">
&dtml-subtotal;<br>
<dtml-call "REQUEST.set('shipping',_.int(subtotal)*.05)">
&dtml-shipping;<br>
<dtml-var shipping fmt=dollars-and-cents>
</dtml-let>

Here is the result:

3.5
0.15
$0.15

I also tried it with a value of 4 instead of 3.50, and it still worked fine.
That's why I say it does work (Windows2000, Zope 2.3.3).  Why do you say it
doesn't?  Methinks you have some other problem...


Cheers,

Tom P