Re: Getting total number of items ordered

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10531
interpreted = N
texte = >I need to know how to get a total number of items ordered to calculate >shipping costs. I found the [numLineItems] command but that appears to >only get the number of separate items ordered, not the overall total. >Am I missing something in the docs?Good point. We should probably pre-calculate that for you. But in the meantime you can use a [math] context to calculate it yourself.[math]totalItems=[lineItems][quantity]+[/lineItems]0[/math]which looks like totalItems=1+3+1+1+3+0 to WebDNA (the last 0 is to prevent a dangling + in the equation)Then somewhere in your purchase form you can put something like There is another way to do this with Formulas.db, but I'll leave that as an exercise to the reader.Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: Getting total number of items ordered (Grant Hulbert 1997)
  2. Getting total number of items ordered (John S. Winningham 1997)
>I need to know how to get a total number of items ordered to calculate >shipping costs. I found the [numLineItems] command but that appears to >only get the number of separate items ordered, not the overall total. >Am I missing something in the docs?Good point. We should probably pre-calculate that for you. But in the meantime you can use a [math] context to calculate it yourself.[math]totalItems=[lineitems][quantity]+[/lineItems]0[/math]which looks like totalItems=1+3+1+1+3+0 to WebDNA (the last 0 is to prevent a dangling + in the equation)Then somewhere in your purchase form you can put something like [math]totalItems*1.95[/math]>There is another way to do this with formulas.db, but I'll leave that as an exercise to the reader.Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Grant Hulbert

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:

Sku numbers (1997) RAM variables (1997) Still online from NY (2003) Sku numbers (1997) Re:Emailer and encryption (1997) Zip Codes (2003) [table] retained in memory (2006) Format of Required fields error message (1997) Q: writefile and uploads. (1998) Resume Catalog ? (1997) WebDNA Windows License (2004) ShowNext Command (1997) Snake Bites (1997) Emailer problem with WC 2.1, NT, WebSite 2.1 (1998) Next (1997) Date search and sendmail (1997) upgrading (1997) Generating Report Totals (1997) Include Files (1998) sendmail Q (2001)