[Zope] dtml-if confusion

Luis Cortes lcortes@pollak.com
Tue, 13 Jun 2000 14:03:01 -0600


I believe you need the following ( the following is psuedo code):

an initial dtml method that processes your form, let call it dtmlForm and it
has a variable prod_req which says how much of the product is requested.

In dtmlForm you of course must call some dtml method which we call
dtmlVerify.

In dtmlVerify you need to check:

    do a dtml-let xyz= "queryProduct"  ...

    do a dtml-if "xyz <= prod_req" then ok else error.


I think that's it.

let me know if this helps.



-----Original Message-----
From: Kenny Flegal <soulstompp@hotmail.com>
To: zope@zope.org <zope@zope.org>
Date: Tuesday, June 13, 2000 11:48 AM
Subject: [Zope] dtml-if confusion


>I have basically completed a management interface for one of our clients
>using zope. I have your standard product and order management. If a
customer
>orders something that is out of stock I need to create a back order.
>
>I add an order in a query called addorder, in this I need to set up an if
>statement to make sure their is enough product in stock. I have a seperate
>query called onhand, this selects a product and returns instock a field
>containing the number in stock of a product. I need to pull instock from
>this query and subtract quantity they entered in the form and find out if
>the result is greater than or equal to zero. I have the insert statement
and
>everything else I just can't figure out how to call instock from the onhand
>query and quantity from REQUEST (I think it is still in request even though
>i am in a ZSQL method) and then test if the result is greater than or equal
>to 0.
>
>If anyone could help me with this it would be greatly appreciated.
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )