Cumulative Shipping charge calculations - your help please.

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13797
interpreted = N
texte = Per your suggestion we tried to do a lineitem loop. As before we get the handling charge(unitshipcost) from the catalog.txt database * lineitem qty to calculate ok. But we are not able to add up the total quantity of items purchased and multiply it time the lookup value from the shipcost.db database to have and cumulative total. Shipping & handling total = (sum(lineitem qty * lineitem handling)) + (sum(lineitem qty)) * shipping charge). Here is the code we wrote in the formula.dbName Formula shipCost [lineItems][/lineItems][math][lookup db=ShipCosts.db&lookInField=ShipMethod&value=[shipVia]&returnField=SHIPCOST] *[totalqty][/math] unitShipCost [lookup db=bushelcatalog.txt&lookInField=sku&value=[sku]&returnField=UNITSHIPCOST] Shipcost.db contentShipMethod ShipCost VANCOUVER 0.00 CLARKCOUNTY 5.00 UPSGROUND 8.95 UPS2NDDAY 18.95 UPSNEXTDAY 28.95Your advice and guidance is appreciated.Virtualrep Associated Messages, from the most recent to the oldest:

    
  1. Cumulative Shipping charge calculations - your help please. (updates@virtualrep.com (Updates) 1997)
Per your suggestion we tried to do a lineitem loop. As before we get the handling charge(unitshipcost) from the catalog.txt database * lineitem qty to calculate ok. But we are not able to add up the total quantity of items purchased and multiply it time the lookup value from the shipcost.db database to have and cumulative total. Shipping & handling total = (sum(lineitem qty * lineitem handling)) + (sum(lineitem qty)) * shipping charge). Here is the code we wrote in the formula.dbName Formula shipCost [math]totalqty=0[/math]>[lineitems][math]totalqty=totalqty+[quantity][/m ath]>[/lineItems][math][lookup db=ShipCosts.db&lookInField=ShipMethod&value=[shipVia]&returnField=SHIPCOST] *[totalqty][/math] unitShipCost [lookup db=bushelcatalog.txt&lookInField=sku&value=[sku]&returnField=UNITSHIPCOST] Shipcost.db contentShipMethod ShipCost VANCOUVER 0.00 CLARKCOUNTY 5.00 UPSGROUND 8.95 UPS2NDDAY 18.95 UPSNEXTDAY 28.95Your advice and guidance is appreciated.Virtualrep updates@virtualrep.com (Updates)

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:

(1997) Share cost of training videos! (1998) Filemaker Pro & Webcatalog (1999) Database flushing does not work any more... (2000) Re:Password Authentication - request example (1998) Shopping cart now bad (1997) WebCat2 - many [carts] on one template page? (1997) Sort Order on a page search (1997) find with exceptions (1997) WebCatalog Mac 2.1b3 (1997) HideIf ip= OR ip (1998) How to Display text in empty fields (1997) [lookup] still not working (1998) WebCat2.0 [format thousands .0f] no go (1997) show all problem (1997) Multiple catalog databases and showcart (1997) Locking up with WebCatalog... (1997) Turning a URL into a link (2003) [WriteFile] problems (1997) Re:WebDNA Writer Needed (1997)