Re: ShipCost formula (for weight *and* quantities)?

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 22039
interpreted = N
texte = >Just realized my shipcost formula is not properly accounting for line items >that have a quantity of more than one! (ooops!)Your formula looks OK at first glance, so try putting [WriteFile] inside the formula to write out the interior of the [math] context so you can see the whole equation as it would be 'seen' by the math context.[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]][WriteFile file=debugFormula.txt][lineItems]([lookup db=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/line Items]0[/WriteFile]Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.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)
>Just realized my shipcost formula is not properly accounting for line items >that have a quantity of more than one! (ooops!)Your formula looks OK at first glance, so try putting [writefile] inside the formula to write out the interior of the [math] context so you can see the whole equation as it would be 'seen' by the math context.[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]][WriteFile file=debugFormula.txt][lineitems]([lookup db=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/line Items]0[/WriteFile]Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ 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:

download a file (2001) ShowIf & HideIf Question? (1998) Nested tags count question (1997) Post arguments problem mac? (1997) Alternating colors (1997) Cancel Subscription (1996) Major Security Hole IIS NT (1998) ShipCost and TaxRate problems (1998) Forbidden CGI Error (1997) Lets make a deal (2000) [SearchString] usage (1997) WebCat/CyberStudio Compatibility (1998) Lineitems not showing up in ThankYou page (2006) [SHOWIF AND/OR] (1997) graphics server, SSL, Netscape 4.0 (off topic) (1998) tcp connect includes (1999) Attn: Bug in GeneralStore example b15 (1997) [showif],[refferer],[include] in errormessages.db (2002) Return records from another (1997) WebCat2.0 acgi vs plugin (1997)