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:

Date Formats (1997) 256 character limit in URL? Kinda urgent... (2004) searchable list archive (1997) Deleting Multiple Database Records based on Checkbox (1998) Emailer Set Up (1997) [Sum] function? (1997) Individual Tax on Items (1998) Quick Question About Sorting (1997) Robert Minor duplicate mail (1997) File Upload (1997) Authorize.net, SIM, tcpconnect and applescript (2003) Adding Items to Cart (2003) about this server and links to who (1997) quantity minimum problem (1997) [WebDNA] Filtering exact numbers (2008) How to verify email address (1997) Buying sans cart (1997) Webstar 4.2 Stops Serving (2000) pc (1997) Multiple prices (1997)