Re: Adding up weights

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17219
interpreted = N
texte = >Each of my products has a fixed weight but the shipping cost is based on >total order weight, I want to add the weights (multiplied by the quantity) >together on my invoice page so that I have a total weight to work out the >shipping costThe simplest approach is to set the unitShipCost field in your product database to be whatever the dollar cost is to ship that item. You would pre-calculate the cost to ship 1 item based on its weight, and put that cost into the database. Once you do that, there are no special formulas needed, because WebCatalog automatically does the quantity and total calculations.Or, if you really want a formula, the following should work:[math][lineitems][quantity]*[weight]+[/lineitems]0[/math]This generates a math equation like 1*2.5 + 3*1.1 + 15*2.2 + 0, if you have quantities 1,3,15 and weights 2.5, 1.1, 2.2Technical 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: Adding up weights (Jay Van Vark 1998)
  2. Re: Adding up weights (Brian B. Burton 1998)
  3. Re: Adding up weights (PCS Technical Support 1998)
  4. Re: Adding up weights (Sandra L. Pitner 1998)
  5. Adding up weights (Paul Willis 1998)
>Each of my products has a fixed weight but the shipping cost is based on >total order weight, I want to add the weights (multiplied by the quantity) >together on my invoice page so that I have a total weight to work out the >shipping costThe simplest approach is to set the unitShipCost field in your product database to be whatever the dollar cost is to ship that item. You would pre-calculate the cost to ship 1 item based on its weight, and put that cost into the database. Once you do that, there are no special formulas needed, because WebCatalog automatically does the quantity and total calculations.Or, if you really want a formula, the following should work:[math][lineitems][quantity]*[weight]+[/lineitems]0[/math]This generates a math equation like 1*2.5 + 3*1.1 + 15*2.2 + 0, if you have quantities 1,3,15 and weights 2.5, 1.1, 2.2Technical 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:

[numFound] inside [showIf]? (2000) Bug Report, maybe (1997) UPS Shipping Primer (2003) Email within tmpl ? (1997) HELP!!! (1998) Bug in Mac webcatalog3_0_5b11 (1999) [convertchars] limits (1998) Bug or syntax error on my part? (1997) Was it something I said??? (1998) Redirect frame targets (1998) download database (2000) Re:quit command on NT (1997) Multiple cart additions (1997) Forms Search Questions (1997) [WebDNA] contents of db files disappearing including triggers.db (2019) Multiple Pulldowns (1997) Re:quit command on NT (1997) Parameter Problem ATTN: Ken Grome (1998) New Website with Redakto CMS (2003) WebCatalog on Linux (2000)