Re: [shippingtotal] still...

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 45757
interpreted = N
texte = WJ Starck wrote: > Now, the million dollar question: > > 1) How can I use the above in Formulas.db to properly calculate the > shipping charges?You cannot affect existing line items, unless you delete the lines and readd them. Formulas.db only fires upon [addlineitem] context (or ?command=add but you should really use the context).> 2) Can I somehow override the shipping cost calculated in Formulas.db > with the above WebDNA in a template?Use a [lineitems] loop and [setlineitem] (with a password) to alter the individual lines. Use a [setheader] to alter the header ShipCost field itself. My preferred method is to always use contexts to add line items at the top of the target page (which may very well be the cart page itself), so I can preprocess the lines anywhich way I want. I can add hidden lineitems (for a discount for example) or walk the lines and delete/alter existing items.Since you have such a simple shipping scheme, I would just use the header and set all of the line items unitshipcost to 0. Just have a loop at the top of the cart page which loops through the line items and updates the shipcost header field accordingly.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [shippingtotal] still... (John Peacock 2002)
  2. Re: [shippingtotal] still... (Donovan 2002)
  3. Re: [shippingtotal] still... (John Peacock 2002)
  4. Re: [shippingtotal] still... (Donovan 2002)
  5. Re: [shippingtotal] still... (Donovan 2002)
  6. Re: [shippingtotal] still... (John Peacock 2002)
  7. [shippingtotal] still... (WJ Starck 2002)
WJ Starck wrote: > Now, the million dollar question: > > 1) How can I use the above in formulas.db to properly calculate the > shipping charges?You cannot affect existing line items, unless you delete the lines and readd them. formulas.db only fires upon [addlineitem] context (or ?command=add but you should really use the context).> 2) Can I somehow override the shipping cost calculated in formulas.db > with the above WebDNA in a template?Use a [lineitems] loop and [setlineitem] (with a password) to alter the individual lines. Use a [setheader] to alter the header ShipCost field itself. My preferred method is to always use contexts to add line items at the top of the target page (which may very well be the cart page itself), so I can preprocess the lines anywhich way I want. I can add hidden lineitems (for a discount for example) or walk the lines and delete/alter existing items.Since you have such a simple shipping scheme, I would just use the header and set all of the line items unitshipcost to 0. Just have a loop at the top of the cart page which loops through the line items and updates the shipcost header field accordingly.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ John Peacock

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:

Locking up with WebCatalog... (1997) unable to launch acgi in WebCat (1997) Formulas.db not working (2006) database with 10,000+ web pages stored in it? (2000) Maybe minor bug report (1997) wc 2 pro users - sites, quotes wanted (1997) japanese characters (1997) Group search doesn't work. (1997) Cyberstudio and WebDNA (1997) Country & Ship-to address & other fields ? (1997) Online reference (1997) Introduction/Tutorial/QuickStart (1997) Stop the madness. (1997) WebCat2b15MacPlugin - showing [math] (1997) passing the variable (1999) FYI: virus alert (1996) Problem with Setheader (2001) Cart ID Duplication (2001) [WebDNA] table comma field delimiter bug? (2012) Ship Cost Calculated via Subtotal (1998)