Re: Another option
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 63280
interpreted = N
texte = Hi ClintFr some reason the code does not display a thing, I do not get a list of theline items or the totalsI am going crazy here and cannot understand why nothing happens[math][index]=[TextE]*[quantity]*[price][/math] displays all the correcttotals, just doesnt seem to wnat to set the variables with item[index]Any ideas?Many thanksPaul----- Original Message ----- From: "Clint Davis"
To: "WebDNA Talk" Sent: Tuesday, October 25, 2005 9:55 PMSubject: Re: Another option> You could set a [math] variable for each lineitem with the price as> calculated below, then total those [math] variables at the end of the> [lineitems] loop. Try this:>> [!] display line items [/!]> [lineitems]> [math]item[index]=[TextE]*[quantity]*[price][/math]> [/lineitems]>> [!] display lineitems total [/!]> [loop start=1&end=[numlineitems]]> [math]itemsTotal=itemsTotal+item[index][/math]> [/loop]>>> On 10/25/05 2:35 PM, "paul" wrote:>> > Yes the code works to a point> >> > it gives me the correct price of each item but I need to find a way of> > totalling them, if I have 4 items in the cart it shows the 4 prices as I> > need them but> >> > Cannot work out the code for that, I need to add up the list of thesenot> > just display them> >> > Help needed!!> >> > Thanks> > paul> >> >> > ----- Original Message -----> > From: "Clint Davis" > > To: "WebDNA Talk" > > Sent: Tuesday, October 25, 2005 9:19 PM> > Subject: Re: Another option> >> >> >> As long as you're inside an [orderfile] and [lineitems] loop, the mathyou> >> have below should work.> >>> >>> >> On 10/25/05 1:11 PM, "paul" wrote:> >>> >>> How can I just add up the contents of my shopping cart based on the> >>> following> >>>> >>> Each items price is calculated by> > [math][TextE]*[quantity]*[price][/math]> >>>> >>> I just need to add these together for each line in the cart, I canlist> > them> >>> but do not seem to be able to add them up> >>>> >>> How do I do this>>>>> -------------------------------------------------------------> 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://webdna.smithmicro.com/>-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hi ClintFr some reason the code does not display a thing, I do not get a list of theline items or the totalsI am going crazy here and cannot understand why nothing happens[math][index]=[TextE]*[quantity]*[price][/math] displays all the correcttotals, just doesnt seem to wnat to set the variables with item[index]Any ideas?Many thanksPaul----- Original Message ----- From: "Clint Davis" To: "WebDNA Talk" Sent: Tuesday, October 25, 2005 9:55 PMSubject: Re: Another option> You could set a [math] variable for each lineitem with the price as> calculated below, then total those [math] variables at the end of the> [lineitems] loop. Try this:>> [!] display line items [/!]> [lineitems]> [math]item[index]=[TextE]*[quantity]*[price][/math]> [/lineitems]>> [!] display lineitems total [/!]> [loop start=1&end=[numlineitems]]> [math]itemsTotal=itemsTotal+item[index][/math]> [/loop]>>> On 10/25/05 2:35 PM, "paul" wrote:>> > Yes the code works to a point> >> > it gives me the correct price of each item but I need to find a way of> > totalling them, if I have 4 items in the cart it shows the 4 prices as I> > need them but> >> > Cannot work out the code for that, I need to add up the list of thesenot> > just display them> >> > Help needed!!> >> > Thanks> > paul> >> >> > ----- Original Message -----> > From: "Clint Davis" > > To: "WebDNA Talk" > > Sent: Tuesday, October 25, 2005 9:19 PM> > Subject: Re: Another option> >> >> >> As long as you're inside an [orderfile] and [lineitems] loop, the mathyou> >> have below should work.> >>> >>> >> On 10/25/05 1:11 PM, "paul" wrote:> >>> >>> How can I just add up the contents of my shopping cart based on the> >>> following> >>>> >>> Each items price is calculated by> > [math][TextE]*[quantity]*[price][/math]> >>>> >>> I just need to add these together for each line in the cart, I canlist> > them> >>> but do not seem to be able to add them up> >>>> >>> How do I do this>>>>> -------------------------------------------------------------> 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://webdna.smithmicro.com/>-------------------------------------------------------------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://webdna.smithmicro.com/
"paul"
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:
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Trouble with Netscape (1998)
E-Mail Formatting (2000)
Drop Down Menus (2002)
SSL Certs (2003)
Review comparison by PC Magazine: Open for On-line Business (1997)
Server Jumping and Web-networking (2000)
WebCat and tracking click through's (2001)
PCS Customer submissions ? (1997)
Search design (1997)
Upcoming 2.1 Release and PCS Committment (1997)
RE: Signal Raised (1997)
checksum for credit cards? (1997)
Cancel Subscription (1996)
searching illegal HTML (2002)
redirect question (2001)
Encrypt and Commit Me (1998)
New to WebCat, Help. (1998)
Another issue with [Date format] (1998)
To Err or Not Custom Error (1999)