Passing [quantity]

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34999
interpreted = N
texte = 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 -----------------------------------------------------
(snip)[quantity](Note: If I use the following, I don't get the 8-digit replacement, but it allows users to enter a different value for [quantity. That's not what I'd like them to do here, because [price] is calculated according to the quantity ordered and they can cheat the system here.) Invoice.tpl ----------------------------------------------------- [SetHeader cart=[cart]]shipVia=[url][__shipVia][/url]&State=[url][__State][/url]&CartIPAddr ess=[ipAddress][/SetHeader][lineitems] [SetLineItem cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpr et]&textA=[url][lookup db=POL.db&lookinfield=sku&value=[url][sku][/url]&returnfield=Name][/url][/SetLin eItem] [/lineitems] (snip)[lineItems] [lineIndex] [sku]  [textA] [quantity] $[price] $[format .2f][math][quantity]*[price][/math][/format] [/lineItems]------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Passing [quantity] (Glenn Busbin 2000)
  2. Re: Passing [quantity] (Glenn Busbin 2000)
  3. Re: Passing [quantity] (John Peacock 2000)
  4. Passing [quantity] (Glenn Busbin 2000)
  5. Passing [quantity] (Glenn Busbin 2000)
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 ----------------------------------------------------- [cart]> ShoppingCart.tpl -----------------------------------------------------
[cart]>(snip)[quantity](Note: If I use the following, I don't get the 8-digit replacement, but it allows users to enter a different value for [quantity. That's not what I'd like them to do here, because [price] is calculated according to the quantity ordered and they can cheat the system here.) Invoice.tpl ----------------------------------------------------- [SetHeader cart=[cart]]shipVia=[url][__shipVia][/url]&State=[url][__State][/url]&CartIPAddr ess=[ipaddress][/SetHeader][lineitems] [SetLineItem cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpr et]&textA=[url][lookup db=POL.db&lookinfield=sku&value=[url][sku][/url]&returnfield=Name][/url][/SetLin eItem] [/lineitems] [cart]>(snip)[lineitems] [lineIndex] [sku]  [textA] [quantity] $[price] $[format .2f][math][quantity]*[price][/math][/format] [/lineItems]------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Glenn Busbin

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] Successful, working WebDNA7/CentOS install? (2013) emailer and bad addresses (1997) Running _every_ page through WebCat-error.html (1997) WC2f3 (1997) Can't use old cart file (was One more try) (1997) Include a big block of text (1997) Indexing Web sites? (2000) OT: Version Control (2007) Help with taxTotal calculation (1998) ReturnRaw and redirect one last question (1997) Automatic thumbnail images (1998) tcp connect includes (1999) Location of Browser Info.txt file (1997) Date Range search (1997) Emailer setup (1997) Nesting WebDNA in JavaScript (2003) security problem (1997) Show items based on login Password (2003) bug ? causes NT event log to fill (1997) WebCat for Site Search? (1997)