ShipCost formula (for weight *and* quantities)?

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 22038
interpreted = N
texte = Hi all,Just realized my shipcost formula is not properly accounting for line items that have a quantity of more than one! (ooops!)I've tried playing with the formula live on the server, but am missing something. Here's my current formula: [lookup db=ShipCosts.db&lookInField=weight&value=[math][lineItems]([lookup db=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/line Items]0[/math]&returnField=[shipVia]] I'm trying to multiply the weight of an item by the quantity selected for that item. I'm moving to my development server to continue to play with it, but wonder if anyone can quickly spot the flaw in my formula?Thanks,Dale Stokdyk dstokydk@dvs.mv.com Associated Messages, from the most recent to the oldest:

    
  1. Re: ShipCost formula (for weight *and* quantities)? (PCS Technical Support 1998)
  2. ShipCost formula (for weight *and* quantities)? (Dale Stokdyk 1998)
Hi all,Just realized my shipcost formula is not properly accounting for line items that have a quantity of more than one! (ooops!)I've tried playing with the formula live on the server, but am missing something. Here's my current formula: [lookup db=ShipCosts.db&lookInField=weight&value=[math][lineitems]([lookup db=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/line Items]0[/math]&returnField=[shipVia]] I'm trying to multiply the weight of an item by the quantity selected for that item. I'm moving to my development server to continue to play with it, but wonder if anyone can quickly spot the flaw in my formula?Thanks,Dale Stokdyk dstokydk@dvs.mv.com Dale Stokdyk

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:

WebCat2b13MacPlugIn - [include] (1997) calculating tax rates, mail order solutions and version 2 (1997) Re:[ShowIf] and empty fields (1997) Robots fill event log (1997) Searching and accented chars (1998) price totals (2003) [MOVEFILE] question (2004) orderfile stuff (1998) WC3 and SSL on NT (1998) Multi Colonns (1998) Same DB Same Time (2004) Document Contains No Data! (1997) Database Structure? (1998) I give up!! (1997) ShowNext Context (2005) Need relative path explanation (1997) Triggers (2001) breaking words (1997) Copyright ? (1997) Location of Webcat site in folder hierarchy (1997)