Re: Frustration with formulas.db
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25460
interpreted = N
texte = For the tax problem, make sure you have a field in the database namedtaxable with each product set to true or the tax will not work.As for your shipping, you need to fix your formula a bit.You formula:Shiptype [math]2.00+([lineitems](1*[quantity])[/lineitems])[/math]should be called shipcost, and is not going to calculate correctly becauseyou need to make it show everyline item qualtity.Try:Shipcost [hideif0=[math]0[lineitems]+[quantity][/lineitems][/math]][math]2.00+(2.00*(0[lineitems]+[quantity][/lineitems]))[/math][/hideif]This will add all the quantities up for you and also zero out the shippingcost if they check out the shoppingcart page before any items have beenadded.Brian BoegershausenWebCatalog Programmerwww.orderbywire.com----- Original Message -----From: Kevin Lippert
To: WebCatalog Talk Sent: Tuesday, December 14, 1999 12:24 AMSubject: Frustration with formulas.db> I'd like the taxRate to lookup on [State] if [ShipToState] is blank (so> people don't have to enter a ShipToState seperately). My first thought is> that this is easiest to do in formulas.db, something like:>> taxRate [interpret][lookup db=TaxRates.db&lookInField=State&value=[showif> [ShipToState]>][ShipToState][/showif][showif>[ShipToState]=][State][/showif]&returnField=taxRate¬Found=0.00][/inter> pret]>> which seems to return the proper tax rate based on the value in [State],> but the builtin [taxTotal] value always returns 0.00. Does this come> from someplace else than [taxRate]*[taxableTotal]?>> A second, maybe related question, concerns ShipCosts.db. We want to> charge $4 for the first item, and $2 for each item thereafter. Again, I> thought it easiest to use this formula in ShipCosts.db:>> Shiptype [math]2.00+([lineitems](1*[quantity])[/lineitems])[/math]>> the logic here being $2.00 plus ($2 * the number of items), but this> doesn't seem to work, either (even wrapped in [interpret])>> Can I not use formulas like [math] and [showif] in lookups like these?>> Thanks in advance,>> Kevin Lippert>> -------------------------------------------------------------> Brought to you by CommuniGate Pro - The Buzz Word Compliant MessagingServer.> 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-------------------------------------------------------------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:
For the tax problem, make sure you have a field in the database namedtaxable with each product set to true or the tax will not work.As for your shipping, you need to fix your formula a bit.You formula:Shiptype [math]2.00+([lineitems](1*[quantity])[/lineitems])[/math]should be called shipcost, and is not going to calculate correctly becauseyou need to make it show everyline item qualtity.Try:Shipcost [hideif0=[math]0[lineitems]+[quantity][/lineitems][/math]][math]2.00+(2.00*(0[lineitems]+[quantity][/lineitems]))[/math][/hideif]This will add all the quantities up for you and also zero out the shippingcost if they check out the shoppingcart page before any items have beenadded.Brian BoegershausenWebCatalog Programmerwww.orderbywire.com----- Original Message -----From: Kevin Lippert To: WebCatalog Talk Sent: Tuesday, December 14, 1999 12:24 AMSubject: Frustration with formulas.db> I'd like the taxRate to lookup on [State] if [ShipToState] is blank (so> people don't have to enter a ShipToState seperately). My first thought is> that this is easiest to do in formulas.db, something like:>> taxRate [interpret][lookup db=TaxRates.db&lookInField=State&value=[showif> [ShipToState]>][ShipToState][/showif][showif>[ShipToState]=][State][/showif]&returnField=taxRate¬Found=0.00][/inter> pret]>> which seems to return the proper tax rate based on the value in [State],> but the builtin [taxTotal] value always returns 0.00. Does this come> from someplace else than [taxRate]*[taxableTotal]?>> A second, maybe related question, concerns ShipCosts.db. We want to> charge $4 for the first item, and $2 for each item thereafter. Again, I> thought it easiest to use this formula in ShipCosts.db:>> Shiptype [math]2.00+([lineitems](1*[quantity])[/lineitems])[/math]>> the logic here being $2.00 plus ($2 * the number of items), but this> doesn't seem to work, either (even wrapped in [interpret])>> Can I not use formulas like [math] and [showif] in lookups like these?>> Thanks in advance,>> Kevin Lippert>> -------------------------------------------------------------> Brought to you by CommuniGate Pro - The Buzz Word Compliant MessagingServer.> 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-------------------------------------------------------------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
Brian Boegershausen
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:
Banner DNA (1997)
[ShowNext] feature in 2.0 (1997)
[WebDNA] Problem with SendMail - seems succesfull but nothing to recieve (2016)
WebCat2b12plugin - [search] is broken ... not! (1997)
OT ImageMagick on OS X (2003)
Feature Request (1999)
Trouble with Showif and Search (1998)
WebCat 5 Intranet Question (2003)
WebCat2 - many [carts] on one template page? (1997)
PCS Emailer's role ? (1997)
Ship via options price (2000)
How To question on setting up downloads (1997)
hm. (2002)
numeric sorting (2001)
Integration with SQL (1997)
[WebDNA] Date: header on emails - timezone problem perhaps (2010)
Image maps/Webcat (1997)
SendMail - Idea (2000)
OH MY GOD! (1998)
Sharing with you my Online help system (2006)