Re: Counting LineItems
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 31933
interpreted = N
texte = Ahh such happiness!!.... got it to fire properly by putting the formula in the template. [math]zprice=15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]zprice=[zprice]and adding [zprice] to the lineitem
[format 6.2f][zprice][/format] | [format 6.2f][price][/format] | [zprice] calculates as expected..Great![price] returns 17.77this last day and a 1/2 i could only return the final formula value (15 - 3 - 2 10) no matter what the quantity of [basket] when:Name
Formula price[math]15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]always returns 10 So i think there is some hinkyness in my calling the formula above.. so I added another entry into formula.dband tried:nameformulatprice[math]tprice=15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]and got [format 6.2f][zprice][/format] | -this yielded $15.00 with 1 line - success[format 6.2f][tprice][/format] | -this yielded $00. 00 with 1 line - then tried nameformulatprice[math]15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math][format 6.2f][zprice][/format] | -this yielded $15.00 with 1 line - success[format 6.2f][tprice][/format] | -this yielded $00. 00 with 1 line - I'am missing something essential...John P and John B thanks so much for the help! Charley ConquestFresh Music-- You wrote:Chas,did you try John Peacock's neat formula? Does it behave now?If not then break the problem down into smaller pieces. Put that formula code in the template itself, but assign a variable to the price value so you can see what it islater down. For example put this directly into the template-basket=[basket]
[math]zprice=15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]zprice=[zprice]see if you get what you think you should get.Now also see if you can get *any* formula to work. Try- ---- NameFormula price17.77--- 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:
Ahh such happiness!!.... got it to fire properly by putting the formula in the template. [math]zprice=15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]zprice=[zprice]and adding [zprice] to the lineitem[format 6.2f][zprice][/format] | [format 6.2f][price][/format] | [zprice] calculates as expected..Great![price] returns 17.77this last day and a 1/2 i could only return the final formula value (15 - 3 - 2 10) no matter what the quantity of [basket] when:NameFormula price[math]15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]always returns 10 So i think there is some hinkyness in my calling the formula above.. so I added another entry into formula.dband tried:nameformulatprice[math]tprice=15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]and got [format 6.2f][zprice][/format] | -this yielded $15.00 with 1 line - success[format 6.2f][tprice][/format] | -this yielded $00. 00 with 1 line - then tried nameformulatprice[math]15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math][format 6.2f][zprice][/format] | -this yielded $15.00 with 1 line - success[format 6.2f][tprice][/format] | -this yielded $00. 00 with 1 line - I'am missing something essential...John P and John B thanks so much for the help! Charley ConquestFresh Music-- You wrote:Chas,did you try John Peacock's neat formula? Does it behave now?If not then break the problem down into smaller pieces. Put that formula code in the template itself, but assign a variable to the price value so you can see what it islater down. For example put this directly into the template-basket=[basket]
[math]zprice=15[ShowIf [basket]>2]-3[/showif][ShowIf [basket]>5]-2[/ShowIf][/math]zprice=[zprice]see if you get what you think you should get.Now also see if you can get *any* formula to work. Try- ---- NameFormula price17.77--- 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:
WC + MYSQL + ODBC (2002)
WebMerchant 1.6 and SHTML (1997)
Security hole in WebCat? (1999)
Product display (2000)
database with 10,000+ web pages stored in it? (2000)
[SearchString] usage (1997)
WC3 and SSL on NT (1998)
Email password -- was Classified Ads 4 Sale (1998)
WC2b12: Yes, Formulas.db is for real (1997)
ErrorMessages.db suggestion (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Non-repeating Random Numbers - CORRECTION (2002)
Using Applescript to process WebCatalog functions (1998)
Sitebuilder (2004)
Newbie Tax Question (1997)
WebDNA can't be controlled from terminal (2004)
Showif Or (2000)
pay processing (2001)
[taxrate] question (1997)
WebCat2b13MacPlugIn - More limits on [include] (1997)