[ic] modifying [item-quantity]

Mathias Picker mathiasp@venus.virtual-earth.de
Wed, 23 Aug 2000 13:20:03 +0200 (CEST)


First, a big thanks to the developers for a nice piece of software!

But it's a complex one, so one question:

How do I modify [item-quantity] in an [item-list]


Since I have limited stock, I need to stop users from ordering more
items than I have.


I intend to do something along the following lines in basket and
checkout:

[set my_quantity][item-quantity][/set]

[if type=data term="inventory::quantity::[item-code]"
op="<" compare="[scratch my_quantity]"]
[somehow-set item-quantity][data table=inventory col=quantity key="[item-code]"][/set]
Thats all there is, folks!
[/if]

First, I'm looking elegant solution to comparing item-quantity to the
inventory than above, than using a scratch variable. Is there a better
way?

Second, I have no clue as to how to set item-quantity...


Any help apreciated.


/ Mathias
-- 
                            virtual earth
 Mathias Picker
 Geschäftsführer      Gesellschaft für Wissens re/prä sentation mbH

                            Mathias.Picker@virtual-earth.de 
			    Fon +49 89  / 540 7425-1
                            Fax +49 89  / 540 7425-9