Re: Inventory Adjustment SOLUTION

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 29410
interpreted = N
texte = Glen I don't have your code from before... what did you change that now it works when before it didn't? You must have changed *something*!? We must be close to communicating whatever is the issue that was just out of your reach...When you submit a form which has input names (variable names) that match those in an orderfile (or use a [setheader], and/or...?), then those values get saved in that orderfile (i.e. email). So then later you can grab the value for [email] anytime you want simply by putting- [email] on your page. But this only works when that [email] is within an implied or explicit [orderfile] context. (Remember this discussion we had a few weeks ago?) That [email] is an orderfile variable. Other variables only display their values when you use one of the methods I mentioned last time (and possible one or two other methods I may have missed). Make sense? http://www.smithmicro.com/WebDNAReference/OrderFileFormat.html will list the orderfile variables for you.-JohnGlenn Busbin wrote:> This is the solution to my problem of deducting the items ordered from the > number of those items available in the database. See the comment tags () in the code for a bit more info. > > The code below is from the ThankYou.tpl page. > > [orderfile cart=[cart]] > > [SetHeader cart=[cart]]payMethod=[showif [useAC]=T]AC[/showif][hideif > [useAC]=T]CC[/hideif]&[formvariables name=__&exact=F][getchars > start=3][name][/getchars]=[url][value][/url]&[/formvariables][/SetHeader] > >
> > > > > >
Date: [date %B %m, > %Y]Time: [time > %I:%M:%S]Order #: [cart]
> > > > > > > > > > > [lineItems] > > > > > > > > > > > [Replace db=mydatabase.db&eqskudatarq=[sku]]Inv=[math][lookup > db=mydatabase.db&value=[sku]&lookinfield=sku&returnfield=Inv]-[quantity][/ma > th][/replace] > > [/lineItems] > > > > > > > > > > > > > > > >
Item #Product #NameQtyPriceExtension
NAME=textA[lineIndex] VALUE=[name]>[lineindex][sku][textA][quantity]$[price]$[format > .2f][math][quantity]*[price][/math][/format]
SIZE=-1>Subtotal  $[subTotal]
[ShipTostate] > Tax Rate: [taxRate] % Tax  $[taxTotal]
[shipVia] > Shipping & Handling  $[shipCost]
Grand > Total  $[grandTotal]

> > [include file=ThankYouInfo.inc]

> > [/orderfile] > > [purchase cart=[cart]] > > [/showif] > > ------------------------------------------------------------- > 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 ------------------------------------------------------------- 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. Re: Inventory Adjustment SOLUTION (John Butler 2000)
  2. Re: Inventory Adjustment SOLUTION (Glenn Busbin 2000)
Glen I don't have your code from before... what did you change that now it works when before it didn't? You must have changed *something*!? We must be close to communicating whatever is the issue that was just out of your reach...When you submit a form which has input names (variable names) that match those in an orderfile (or use a [setheader], and/or...?), then those values get saved in that orderfile (i.e. email). So then later you can grab the value for [email] anytime you want simply by putting- [email] on your page. But this only works when that [email] is within an implied or explicit [orderfile] context. (Remember this discussion we had a few weeks ago?) That [email] is an orderfile variable. Other variables only display their values when you use one of the methods I mentioned last time (and possible one or two other methods I may have missed). Make sense? http://www.smithmicro.com/WebDNAReference/OrderFileFormat.html will list the orderfile variables for you.-JohnGlenn Busbin wrote:> This is the solution to my problem of deducting the items ordered from the > number of those items available in the database. See the comment tags () in the code for a bit more info. > > The code below is from the ThankYou.tpl page. > > [orderfile cart=[cart]] > > [SetHeader cart=[cart]]payMethod=[showif [useAC]=T]AC[/showif][hideif > [useAC]=T]CC[/hideif]&[formvariables name=__&exact=F][getchars > start=3][name][/getchars]=[url][value][/url]&[/formvariables][/SetHeader] > >
> > > > > >
Date: [date %B %m, > %Y]Time: [time > %I:%M:%S]Order #: [cart]
> > > > > > > > > > > [lineitems] > > > > > > > > > > > [Replace db=mydatabase.db&eqskudatarq=[sku]]Inv=[math][lookup > db=mydatabase.db&value=[sku]&lookinfield=sku&returnfield=Inv]-[quantity][/ma > th][/replace] > > [/lineItems] > > > > > > > > > > > > > > > >
Item #Product #NameQtyPriceExtension
NAME=textA[lineIndex] VALUE=[name]>[lineindex][sku][textA][quantity]$[price]$[format > .2f][math][quantity]*[price][/math][/format]
SIZE=-1>Subtotal  $[subTotal]
[ShipTostate] > Tax Rate: [taxRate] % Tax  $[taxTotal]
[shipVia] > Shipping & Handling  $[shipCost]
Grand > Total  $[grandTotal]

> > [include file=ThankYouInfo.inc]

> > [/orderfile] > > [purchase cart=[cart]] > > [/showif] > > ------------------------------------------------------------- > 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 ------------------------------------------------------------- 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:

Accessing Server Environment Variables (2003) Re:trouble (1997) OT: Website Promotion (1998) Help name our technology! I found it (1997) webcat page crashes MSIE 5 on mac (2000) Location of Browser Info.txt file (1997) WC Database Format (1997) Size Limitation through a POST via SSL? (2005) Webcat 4.5.1 equivalent of autonumber (2003) OT: How much is too much? I can never remember the answer. (2002) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) exclusive db lock with webcat-3 ? (2000) The Form authentication trick (2000) Middle problem (2005) price carry over (1997) RAM variables (1997) Mozilla/4. and Browser Info.txt (1997) SSL, WebSTAR, WebCatalog (1998) [append] and SSL (1997) categorys (1998)