Re: [shippingtotal] & Formulas.db prob
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50500
interpreted = N
texte = Ah sorry, here is the correct formula[format .2f][math][showif [subtotal]<45][lookup db=ShipCosts.db&value=[shipvia]&lookinfield=shipmethod&returnfield=ShipC ost][/showif][showif [subtotal]>44.99]0.00[/showif][showif [thisurl]^verify] [showif priorityfreeship^[shipvia]] +[showif [subtotal]<50.01] [lookup db=dbs/ uspsinsurance.db&value=50&lookinfield=ordersubtotal&returnfield=insuranc e] [/showif] [showif [subtotal]>50] [showif [subtotal]<100.01] [lookup db=dbs/ uspsinsurance.db&value=100&lookinfield=ordersubtotal&returnfield=insuran ce] [/showif] [loop start=100&end=5000&advance=100] [showif [subtotal]>[index].01] [lookup db=dbs/ uspsinsurance.db&value=[index]&lookinfield=ordersubtotal&returnfield=ins urance] [/showif] [/loop] [/showif] [/showif][/showif][/math][/format]-WOn Tuesday, May 20, 2003, at 12:06 PM, WJ Starck wrote:> This formula is in formulas.db like so>> shipcost formula>> where the formula is (minus the white space of course)>> [format .2f][math]>> [showif [subtotal]<45][lookup > db=ShipCosts.db&value=[shipvia]&lookinfield=shipmethod&returnfield=Ship > Cost][/showif][showif [subtotal]>44.99]0.00[/showif]>> [showif [thisurl]^verify]> [showif priorityfreeship^[shipvia]]>> +[showif [subtotal]<50.01]> [lookup > db=dbs/ > uspsinsurance.db&value=50&lookinfield=subtotal&returnfield=insurance]> [/showif]> [showif [subtotal]>50]> [showif [subtotal]<100.01]> [lookup > db=dbs/ > uspsinsurance.db&value=100&lookinfield=subtotal&returnfield=insurance]> [/showif]> > [loop start=100&end=5000&advance=100]> [showif [subtotal]>[index].01]> [lookup > db=dbs/ > uspsinsurance.db&value=[index]&lookinfield=subtotal&returnfield=insuran > ce]> [/showif]> [/loop]> [/showif]> [/showif]> [/showif]> [/math][/format]>> In Shipcosts.db I have>> Shipmethod Shipcost> freeship 0.00> priority 6.50>> Basically, shipping is free if $45 or more is ordered, but insurance > costs are always figured for every order.>> uspsinsurance.db looks like:>> ordersubtotal insurance> 50 1.30> 100 2.20> 200 3.20> ...>> It calculates correctly when the above WebDNA is placed on a template > inside an orderfile context, but [shippingtotal] is still showing > 0.00 inside the same orderfile context.>> Can anyone see why?>>> Will Starck> NovaDerm Skincare Science> http://www.novaderm.com> wjs@novaderm.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/>>--Will StarckNovaDerm Skincare Sciencehttp://www.novaderm.comwjs@novaderm.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:
Ah sorry, here is the correct formula[format .2f][math][showif [subtotal]<45][lookup db=ShipCosts.db&value=[shipvia]&lookinfield=shipmethod&returnfield=ShipC ost][/showif][showif [subtotal]>44.99]0.00[/showif][showif [thisurl]^verify] [showif priorityfreeship^[shipvia]] +[showif [subtotal]<50.01] [lookup db=dbs/ uspsinsurance.db&value=50&lookinfield=ordersubtotal&returnfield=insuranc e] [/showif] [showif [subtotal]>50] [showif [subtotal]<100.01] [lookup db=dbs/ uspsinsurance.db&value=100&lookinfield=ordersubtotal&returnfield=insuran ce] [/showif] [loop start=100&end=5000&advance=100] [showif [subtotal]>[index].01] [lookup db=dbs/ uspsinsurance.db&value=[index]&lookinfield=ordersubtotal&returnfield=ins urance] [/showif] [/loop] [/showif] [/showif][/showif][/math][/format]-WOn Tuesday, May 20, 2003, at 12:06 PM, WJ Starck wrote:> This formula is in formulas.db like so>> shipcost formula>> where the formula is (minus the white space of course)>> [format .2f][math]>> [showif [subtotal]<45][lookup > db=ShipCosts.db&value=[shipvia]&lookinfield=shipmethod&returnfield=Ship > Cost][/showif][showif [subtotal]>44.99]0.00[/showif]>> [showif [thisurl]^verify]> [showif priorityfreeship^[shipvia]]>> +[showif [subtotal]<50.01]> [lookup > db=dbs/ > uspsinsurance.db&value=50&lookinfield=subtotal&returnfield=insurance]> [/showif]> [showif [subtotal]>50]> [showif [subtotal]<100.01]> [lookup > db=dbs/ > uspsinsurance.db&value=100&lookinfield=subtotal&returnfield=insurance]> [/showif]> > [loop start=100&end=5000&advance=100]> [showif [subtotal]>[index].01]> [lookup > db=dbs/ > uspsinsurance.db&value=[index]&lookinfield=subtotal&returnfield=insuran > ce]> [/showif]> [/loop]> [/showif]> [/showif]> [/showif]> [/math][/format]>> In Shipcosts.db I have>> Shipmethod Shipcost> freeship 0.00> priority 6.50>> Basically, shipping is free if $45 or more is ordered, but insurance > costs are always figured for every order.>> uspsinsurance.db looks like:>> ordersubtotal insurance> 50 1.30> 100 2.20> 200 3.20> ...>> It calculates correctly when the above WebDNA is placed on a template > inside an orderfile context, but [shippingtotal] is still showing > 0.00 inside the same orderfile context.>> Can anyone see why?>>> Will Starck> NovaDerm Skincare Science> http://www.novaderm.com> wjs@novaderm.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/>>--Will StarckNovaDerm Skincare Sciencehttp://www.novaderm.comwjs@novaderm.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/
WJ Starck
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:
Anyone have an invoicing system? (1999)
test for John (1999)
Include a big block of text (1997)
Page Counters? (1997)
TCP Connect (1999)
Proper file locations (1997)
ErrorLog.txt (1999)
file truncation -- Mac plugin (2000)
[WebDNA] WebDNA 8.6 announced - New features (2018)
WCS Newbie question (1997)
Semi OT: IE losing info from forms when back button is used (2005)
Text data with spaces in them... (1997)
Follow-up to listfiles bug report ... (2003)
WebCat2 - [format thousands] (1997)
[ShowIf] and empty fields (1997)
logout after authenticated (2002)
shipcost (1997)
Interfacing WebMerchant to www.fedex.com (1997)
Math inside [showif] (1998)
WC2f3 (1997)