Re: Passing [quantity]
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 35002
interpreted = N
texte = Frankly, I'm mystified as to what you are doing, or even why. If youhave your system set up properly, the user can change the quantity when-ever they like and your price gets changed appropriately.I'm guessing that you have some sort of volume discount and you areconcerned that a smart user will order 1000 then go back and change itto 1, yet still get the 1000-unit price.Create a loop at the top of your invoice page, after they have the chance to change the quantity but before they complete the purchase.Use a [lineitems] loop and reset the price based on the quantity in thecart at that time. This way, even if they go back to the shopping_cartpage and adjust the quantity, you will always have a chance to correctthe price.You can also do the price update at the same time they perform changethe quantity. Remember that when changing the price, you need to use aprice-change password. It is not a security issue because it is a context rather than a command (the user never can see the password).John PeacockGlenn Busbin wrote:> > I'm having a problem passing a [quantity] field to Invoice.tpl. It passes> from the Results.tpl to the ShoppingCart.tpl, but when I go to Invoice.tpl,> it's replaced by an 8-digit number.> > This is true for all items added to a cart and each gets the same 8-digit> number in the [quantity] field of Invoice.tpl. Each cart gets a different> 8-digit number and each item in a cart has [quantity] replaced. When the> totals are determined on the Invoice.tpl, the 8-digit number in [quantity]> makes for some major league orders.> > If I go back to ShoppingCart.tpl from Invoice.tpl, the 8-digit number then> replaces [quantity] there, too.> > Here's the code from each page:> > Results.tpl> ----------------------------------------------------->
> > ShoppingCart.tpl> ----------------------------------------------------->