Re: Shipping Based on Number of Items

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21598
interpreted = N
texte = >I need to calculate shipping based on TWO things: > >1) Shipping method selected > >2) Total number of items ordered.You need to come up with a shipCost formula that results in a number based on those values. It's up to you to determine what that formula is, but here are a few hints:1) Test your formula by putting it into the Invoice.tpl page so you can see it and examine the results. Break it down into smaller chunks so you can see each sub-portion's value as you go.2) Since you're using the shipping method, you either need to use [ShowIf] or a [lookup] based on the value of [shipVia], which is presumably set by the customer at some earlier point3) You're allowed to do things like [LineItems] loops inside the formula (any WebDNA is allowed), so to get the Total number of items in the order you can just add up each line's qty with [math][lineitems][quantity]+[/lineitems]0[/math]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: Shipping Based on Number of Items (PCS Technical Support 1998)
  2. Shipping Based on Number of Items (Jim O'Connor 1998)
>I need to calculate shipping based on TWO things: > >1) Shipping method selected > >2) Total number of items ordered.You need to come up with a shipCost formula that results in a number based on those values. It's up to you to determine what that formula is, but here are a few hints:1) Test your formula by putting it into the Invoice.tpl page so you can see it and examine the results. Break it down into smaller chunks so you can see each sub-portion's value as you go.2) Since you're using the shipping method, you either need to use [showif] or a [lookup] based on the value of [shipVia], which is presumably set by the customer at some earlier point3) You're allowed to do things like [lineitems] loops inside the formula (any WebDNA is allowed), so to get the Total number of items in the order you can just add up each line's qty with [math][lineitems][quantity]+[/lineitems]0[/math]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:

WebCatb15 Mac CGI -- [purchase] (1997) Simultaneous Users (1999) Email check problems (1999) problem with NT beta (1997) 3.0 to 4.0 (2000) Summing fields (1997) date format (another question) (2000) error No such file (2001) OT: Sending email to lots of subscribers (1999) Itools, WEBCAT OSX (2003) [addlineitems] (1997) [WebDNA] 2nd pair of eyes on redirect please (2011) RePost: NAT and the CART (1999) Emailer [cart] file names (1997) problems with 2 tags shakur (1997) [ot] Stopping Apple's Log Rolling (2004) WebCatalog for Postcards ? (1997) webten vs. webstar (1998) Public beta 5 of WebCatalog 4.0 is now available (2000) authorizenet and netscape (2002)