how to know the [LineIndex] number webcat generated during a [AddLineItem]?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 26161
interpreted = N
texte = Hi :-) This looks tricky but is not really.On my invoice template I check to see if any lineitem in the person's OderFile has a quantity which is greater than what is in stock... (I store the stock# in the products.db) If so, I want to break the lineitem into 2 lineitems (one with a quantity equal to what is in stock and one with a quantity of the difference). I think I am working out the code well, but am stuck on this one point-...we're now inside a [showif] context (which is inside the OrderFile's [lineitems] context) which only executes when the lineitem does need to be split into 2 lineitems.[!]--START split up---[/!] [SetLineItem cart=[cart]&index=[lineindex]&db=products.db]quantity=[NumInStock][/SetLineItem] [AddLineItem cart=[cart]&sku=[SKU]&db=products.db]quantity=[NumOuttaStock]&textA=[textA]&textB=[textB]&textC=[textC][/AddLineItem] [!]--END split up---[/!]I am ready to test, but how can I get the proper name for that hidden input? For each lineitem I pass a yes or no for this variable depending on whether or not the item is in stock. Easy to make the name of the hidden variable unique for each lineitem when handling a lineitem that has not just been split up (... etc. ) ... but when creating the new lineitem in the above [!]--START split up---[/!]....see above....[!]--END split up---[/!], how do I determine what is the LineIndex number for the lineitem webcat just added while executing the [AddLineItem]...[/AddLineItem]?-John ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. how to know the [LineIndex] number webcat generated during a [AddLineItem]? (John Butler 2000)
Hi :-) This looks tricky but is not really.On my invoice template I check to see if any lineitem in the person's OderFile has a quantity which is greater than what is in stock... (I store the stock# in the products.db) If so, I want to break the lineitem into 2 lineitems (one with a quantity equal to what is in stock and one with a quantity of the difference). I think I am working out the code well, but am stuck on this one point-...we're now inside a [showif] context (which is inside the OrderFile's [lineitems] context) which only executes when the lineitem does need to be split into 2 lineitems.[!]--START split up---[/!] [SetLineItem cart=[cart]&index=[lineindex]&db=products.db]quantity=[NumInStock][/SetLineItem] [AddLineItem cart=[cart]&sku=[SKU]&db=products.db]quantity=[NumOuttaStock]&textA=[textA]&textB=[textB]&textC=[textC][/AddLineItem] [!]--END split up---[/!]I am ready to test, but how can I get the proper name for that hidden input? For each lineitem I pass a yes or no for this variable depending on whether or not the item is in stock. Easy to make the name of the hidden variable unique for each lineitem when handling a lineitem that has not just been split up (... etc. ) ... but when creating the new lineitem in the above [!]--START split up---[/!]....see above....[!]--END split up---[/!], how do I determine what is the LineIndex number for the lineitem webcat just added while executing the [addlineitem]...[/AddLineItem]?-John ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 John Butler

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:

[NT] ie 4.0 required (1997) Customer - again (1998) [WebDNA] SSD's and second disk (2017) [WebDNA] WebDNA is not parsing CSS file (2010) What's New In WebCatalog 3.0.7 (2000) Pithy questions on webcommerce & siteedit (1997) ShowNext example for GeneralStore (1997) Stinkin' [Referrer] (1998) syntax question, not in online refernce (1997) Aquick question about replace (1999) cookies and [returnraw] (1997) Size limit for tmpl editor ? (1997) WebCat Problem? (1999) Determining position (2000) WebCatalog Upgrade Pricing? (1997) Bug Report, maybe (1997) Re:Version 2.0 and 1.6 simultaneous (1997) [OT] two domains one site... (2005) For those of you not on the WebCatalog Beta... (1997) ACGI processing for .html (1997)