Re: Counting LineItems
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 31865
interpreted = N
texte = Wow, Thanks Brian, I'm half way there......I've put a header in the shoppingcart.tpl that calculates lineitems and quantities. I just used [text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text]in the pricebreak.incand call view the text to see if its working.[Include file=pricebreak.inc][basket]great!Now, I'm stumped because I know that [basket] returns the appropriate value and I tried the example below in the formulas.db....not happening...----Name Formulaprice [lookup showif [basket]=1]price=15[/showif][showif [basket]=2]price is 15[/showif][showif [basket]=3]price = 12[/showif]---- essentially I'm looking for the easiest way to build a case/if function to plug in to [price]Charley ConquestFresh Music --- You wrote:I think there is a tag [totallineitems] or something to that nature, Iforget.I have also used in the past[text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text]You can also use this to set a header, then use the header in youformulas.db to do your calculation.[showif [header21]=1]price is 15[/showif][showif [header21]=3]price is 12[/showif]etc----- Original Message -----From: chas
To: WebCatalog Talk Sent: Friday, May 12, 2000 3:20 PMSubject: Counting LineItemsHi All,I'm just starting to use Webcatalog 3.08 on a Mac (OS-9) with Webstar 4.2.Based on the tea room I am selling compact discs. Every compact disc has aunique name in the db. Every CD has a default [Price] value of $15. I wantto calculate a price based on quantity discounts. So if someone buys 1 CD (1lineitem) the price is $15. If they buy 3 CD's (3 lineitems) , I want theprice to go to $12 a CD ($36). If they buy 6 (6 lineitems), I want the priceto go to $10 a CD ($60). And if there were 4 or 5 line items the pricewould hold to $12 a CD.I believe I need to find the value of the number of lineitems, and use thisvalue [xxx] in a lookup to the formula.db.Before I go mucking about, could someone steer me in the right direction onthis?Charley ConquestFresh Musicchas@valley.net--- end of quote ----------------------------------------------------------------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:
Wow, Thanks Brian, I'm half way there......I've put a header in the shoppingcart.tpl that calculates lineitems and quantities. I just used [text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text]in the pricebreak.incand call view the text to see if its working.[Include file=pricebreak.inc][basket]great!Now, I'm stumped because I know that [basket] returns the appropriate value and I tried the example below in the formulas.db....not happening...----Name Formulaprice [lookup showif [basket]=1]price=15[/showif][showif [basket]=2]price is 15[/showif][showif [basket]=3]price = 12[/showif]---- essentially I'm looking for the easiest way to build a case/if function to plug in to [price]Charley ConquestFresh Music --- You wrote:I think there is a tag [totallineitems] or something to that nature, Iforget.I have also used in the past[text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text]You can also use this to set a header, then use the header in youformulas.db to do your calculation.[showif [header21]=1]price is 15[/showif][showif [header21]=3]price is 12[/showif]etc----- Original Message -----From: chas To: WebCatalog Talk Sent: Friday, May 12, 2000 3:20 PMSubject: Counting LineItemsHi All,I'm just starting to use Webcatalog 3.08 on a Mac (OS-9) with Webstar 4.2.Based on the tea room I am selling compact discs. Every compact disc has aunique name in the db. Every CD has a default [Price] value of $15. I wantto calculate a price based on quantity discounts. So if someone buys 1 CD (1lineitem) the price is $15. If they buy 3 CD's (3 lineitems) , I want theprice to go to $12 a CD ($36). If they buy 6 (6 lineitems), I want the priceto go to $10 a CD ($60). And if there were 4 or 5 line items the pricewould hold to $12 a CD.I believe I need to find the value of the number of lineitems, and use thisvalue [xxx] in a lookup to the formula.db.Before I go mucking about, could someone steer me in the right direction onthis?Charley ConquestFresh Musicchas@valley.net--- end of quote ----------------------------------------------------------------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/
chas@valley.net (chas)
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:
Missing Links (2000)
WebCatalog Use Question (1997)
WebCat2 Append problem (B14Macacgi) (1997)
NT vs Mac (1997)
[ShowCart] and GET vs. POST (1997)
Playin Tricks (2006)
Unix webcat perms & multiple versions of same db in cache issue (2000)
Changing buttons (1999)
Symantec VIsual Page 1.0.3 (1997)
Emailer (1997)
Sendmail (1997)
Software & Sites (1998)
Database Updates (1997)
New Mac Public Beta Available (1997)
WebDNA Prefs & Permissions (2005)
WebCat2b12--[searchstring] bug (1997)
Old code new problem? (2004)
Multiple fields on 1 input (1997)
Running 2 two WebCatalog.acgi's (1996)
MacWEEK article help needed (1996)