Re: Counting LineItems

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32397
interpreted = N
texte = also don't you want that to be-[addlineitem cart=[cart]&sku=2168]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem]??make sure you get the syntax right so that doesn't make it even slower to learn the concepts...-Johnchas wrote:> 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)
also don't you want that to be-[addlineitem cart=[cart]&sku=2168]quantity=1&price=[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=discamnt¬Found=0][/addlineitem]??make sure you get the syntax right so that doesn't make it even slower to learn the concepts...-Johnchas wrote:> 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/ John Butler

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:

Signal Raised (1997) insecure default install on unix (2002) Formating found categories (1997) WebCat2 several catalogs? (1997) WebDNA 5 - Function test weirdness or ? (2003) Email Set-Up? (1997) WebTen? (1997) Another question (1997) OT: Hello to the list (2004) Languages (1997) dates and hex formatting (1997) website pro trouble (1998) Live server problems (1999) when is failing to [URL]ize values in a comparison risky? (1999) Integration with SQL (1997) two part electronic product (1998) Help formatting search results w/ table (1997) Now you see it now you donīt (1997) Multiple Passwords (1997) 'does not contain' operator needed ... (1997)