Re: Counting LineItems
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 32358
interpreted = N
texte = Hi,I'm back with a new iteration of relating quantity to discount.thanks to previous help John P,B,Brian I can carry a value of lineitems/quantity around in a header with - starting from the shoppingcart.tpl:[text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text]then basket get put into a header:[SetHeader cart=[cart]]header40=[basket][/SetHeader][header40] returns the right value on Invoice.tpl The problem is.....I want to apply a discount based on the value of [header40]here is what I have inserted after and outside the [lineitems][/lineitems]
Quantity Discount! | $[format .2f][subtotal]-[discount][/format] |
in formulas.db I have a line:name
formuladiscount[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=realprices¬Found=0]and a sample of discount.db looks like thisquant listprice level discamnt realprices159590592 118 59 0 1183 177 46.33 38.01 138.994 236 46.33 50.68 185.32and many many more....where discamnt is the value i want subtracted from the subtotal.I get 0 always....in Quantity Discount!TIACharley ConquestFresh Music-------------------------------------------------------------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:
Hi,I'm back with a new iteration of relating quantity to discount.thanks to previous help John P,B,Brian I can carry a value of lineitems/quantity around in a header with - starting from the shoppingcart.tpl:[text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text]then basket get put into a header:[SetHeader cart=[cart]]header40=[basket][/SetHeader][header40] returns the right value on Invoice.tpl The problem is.....I want to apply a discount based on the value of [header40]here is what I have inserted after and outside the [lineitems][/lineitems] Quantity Discount! | $[format .2f][subtotal]-[discount][/format] |
in formulas.db I have a line:nameformuladiscount[lookup db=discount.db&lookInField=[quant]&value=[header40]&returnField=realprices¬Found=0]and a sample of discount.db looks like thisquant listprice level discamnt realprices159590592 118 59 0 1183 177 46.33 38.01 138.994 236 46.33 50.68 185.32and many many more....where discamnt is the value i want subtracted from the subtotal.I get 0 always....in Quantity Discount!TIACharley ConquestFresh Music-------------------------------------------------------------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:
[addfields] bombing 5.0 (2003)
{Grouping} Docs (1999)
Non-Cart Files in Shopping Cart Folder (1997)
[CART] inside a [LOOP] (1997)
Multiple cart additions (1997)
not interpreting Q (2001)
WebDNA Programmer looking for a new job - again! (2002)
Wrapping text (1998)
HELP WITH DATES (1997)
Two submit buttons ? (1997)
Re:Running 2 two WebCatalog.acgi's (1996)
error No such file (2001)
WebCatalog/WebMerchant 2.1 (1998)
Looping control (1997)
Exclamation point (1997)
[OT] Theiving B*****ds (2004)
WC2.0 Memory Requirements (1997)
PCS Frames (1997)
Random bug, OSX 10.04 (2001)
Problems problems problems (1997)