Re: shipping costs
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 26722
interpreted = N
texte = >I have a unitShipCost for each item in the database>In formulas.db I have the shipcost set to 0.00>>This works out fine . . . . but one the total order equals $50.00 shipping>will be free.This one is a little bit complex, because you're basically asking it to throw out the old shipCost calculation and replace it with a new one 'after the fact'. I think the following formula should work:-- Formulas.db --Name FormulashipCost [math show=f]tempSC=[lineitems][quantity]*[unitshipcost]+[/lineitems]0[/math ][showif [subtotal]>50]-[tempSC][/showif][hideif [subtotal]>50][tempSC][/hideif]This email will have a linebreak in the middle of the formula somewhere; you should make sure this is all on one line to work properly in your formulas.db.What we're doing with this formula is to first loop thru all the lineitems and use math to compute the qty*unitshipcost total for all items, then we decide if the order is more than $50. If so, we send back a *negative* shipCost, which sort of 'removes' the original shipping cost from the grand total. If the order is more than $50, we simply return the shipCost we just computed.Technical Support **********************************Smith Micro, Internet Solutions Div | Formerly, Pacific Coast Software16855 West Bernardo Drive | -------------------------Suite 380 | eCommerce (WebCatalog)San Diego, CA 92127 | Software & Site Development858.675.1106 | http://www.smithmicro.com858.675.0372 (fax) **********************************-------------------------------------------------------------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:
>I have a unitShipCost for each item in the database>In formulas.db I have the shipcost set to 0.00>>This works out fine . . . . but one the total order equals $50.00 shipping>will be free.This one is a little bit complex, because you're basically asking it to throw out the old shipCost calculation and replace it with a new one 'after the fact'. I think the following formula should work:-- formulas.db --Name FormulashipCost [math show=f]tempSC=[lineitems][quantity]*[unitshipcost]+[/lineitems]0[/math ][showif [subtotal]>50]-[tempSC][/showif][hideif [subtotal]>50][tempSC][/hideif]This email will have a linebreak in the middle of the formula somewhere; you should make sure this is all on one line to work properly in your formulas.db.What we're doing with this formula is to first loop thru all the lineitems and use math to compute the qty*unitshipcost total for all items, then we decide if the order is more than $50. If so, we send back a *negative* shipCost, which sort of 'removes' the original shipping cost from the grand total. If the order is more than $50, we simply return the shipCost we just computed.Technical Support **********************************Smith Micro, Internet Solutions Div | Formerly, Pacific Coast Software16855 West Bernardo Drive | -------------------------Suite 380 | eCommerce (WebCatalog)San Diego, CA 92127 | Software & Site Development858.675.1106 | http://www.smithmicro.com858.675.0372 (fax) **********************************-------------------------------------------------------------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
PCS Technical Support
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:
Make sure I understand this??? (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Summing fields (1997)
Shop till you drop dead on the avenue ... (1997)
[WebDNA] Serial numbers and pricing for WebDNA 7.0 (2011)
RequiredFields notes ... (1997)
Web Developer Product Awards (1997)
Location of Browser Info.txt file (1997)
WC2b15 File Corruption (1997)
TCPsend with POST? (1999)
list items (1998)
[Shownext] (1997)
Shipping Costs (1999)
Sorting error (1997)
Searching multiple fields (1997)
bug in wn searching NT version? (1997)
[WebDNA] Feature Request (2019)
2.0 Beta (1997)
Missing from Docs [folderName] (1997)
math on date? (1997)