Re: Counting LineItems

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32382
interpreted = N
texte = hi,I'm not getting a new line added...I've put this line below the lineitems in the invoice.. the sku relates to an empty record, [addlineitem cart=[cart]&sku=2168]&quantity=1&lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][price][/addlineitem]discount.db looks like...quant listpricelevel discamnt realprices 159 59 0 59 2 118 59 0 118 3 177 46.33 -38.01 138.99 4 236 46.33 -50.68 185.32 5 295 46.33 -63.35 231.65 etc...Can I use the lookup this way???It smells like I'm missing a pretty fundamental thing here...Charley--- You wrote: For one thing, the formulas.db is only used by WebCat itself for the fields listed on the doc page (price, taxable, etc.). You cannot just come up with a new variable and expect WebCat to know what to do with it. Your line will always display 0 because it is trying to subtract the string [discount] from the [subtotal], then format it.It is usually better to add a new line item for any discount, rather than trying to work outside of WebCat's system. Put a [addlineitem] on the page after you have calculated the total items and put your lookup there. Add a negative price and quantity 1... --- end of quote ---------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Counting LineItems (chas@valley.net (chas) 2000)
  2. Re: Counting LineItems (John Butler 2000)
  3. Re: Counting LineItems (chas@valley.net (chas) 2000)
  4. Re: Counting LineItems (John Butler 2000)
  5. Re: Counting LineItems (chas@valley.net (chas) 2000)
  6. Re: Counting LineItems (John Butler 2000)
  7. Re: Counting LineItems (Kenneth Grome 2000)
  8. Re: Counting LineItems (chas@valley.net (chas) 2000)
  9. Re: Counting LineItems (John Peacock 2000)
  10. Re: Counting LineItems (chas@valley.net (chas) 2000)
  11. Re: Counting LineItems (chas@valley.net (chas) 2000)
  12. Re: Counting LineItems (kalin@el.net 2000)
  13. Re: Counting LineItems (kalin@el.net 2000)
  14. Re: Counting LineItems (Kenneth Grome 2000)
  15. Re: Counting LineItems (kalin@el.net 2000)
  16. Re: Counting LineItems (kalin@el.net 2000)
  17. Re: Counting LineItems (John Butler 2000)
  18. Re: Counting LineItems (John Peacock 2000)
  19. Re: Counting LineItems (chas@valley.net (chas) 2000)
  20. Re: Counting LineItems (John Butler 2000)
  21. Re: Counting LineItems (John Butler 2000)
  22. Re: Counting LineItems (John Butler 2000)
  23. Re: Counting LineItems (John Peacock 2000)
  24. Re: Counting LineItems (chas@valley.net (chas) 2000)
  25. Re: Counting LineItems (John Butler 2000)
  26. Re: Counting LineItems (chas@valley.net (chas) 2000)
  27. Re: Counting LineItems (Brian Boegershausen 2000)
  28. Counting LineItems (chas@valley.net (chas) 2000)
hi,I'm not getting a new line added...I've put this line below the lineitems in the invoice.. the sku relates to an empty record, [addlineitem cart=[cart]&sku=2168]&quantity=1&lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][price][/addlineitem]discount.db looks like...quant listpricelevel discamnt realprices 159 59 0 59 2 118 59 0 118 3 177 46.33 -38.01 138.99 4 236 46.33 -50.68 185.32 5 295 46.33 -63.35 231.65 etc...Can I use the lookup this way???It smells like I'm missing a pretty fundamental thing here...Charley--- You wrote: For one thing, the formulas.db is only used by WebCat itself for the fields listed on the doc page (price, taxable, etc.). You cannot just come up with a new variable and expect WebCat to know what to do with it. Your line will always display 0 because it is trying to subtract the string [discount] from the [subtotal], then format it.It is usually better to add a new line item for any discount, rather than trying to work outside of WebCat's system. Put a [addlineitem] on the page after you have calculated the total items and put your lookup there. Add a negative price and quantity 1... --- end of quote ---------------------------------------------------------------- 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://search.smithmicro.com/ chas@valley.net (chas)

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:

command=purchase (2000) [showif [math (1999) Webdna 5.0 reference documentation (2003) details (2003) Quiz question: Return all green and blank records? (2001) [OT] Who's got a cool link (2002) Close Databases Crash? (1998) Log-in Scheme (2003) Unformatted Messages (1998) RE: [WebDNA] Can WebDNA corrupt a db? (2012) More on the email templates (I like it) (1997) [WebDNA] Mass email using WebDNA (2008) [WriteFile] problems (1997) Exclude by date - multiple (1997) Multi-processor Mac info ... (1997) Shorthand for command args (1998) RE: [WebDNA] FastCGI version confusion (2011) PSC recommends what date format yr 2000??? (1997) Only charge card when product shipped ? (1997) Getting Emailer to send mail (1997)