Re: Discounts
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 36549
interpreted = N
texte = on 6/21/01 1:52 PM, Nitai @ ComputerOil at nitai@computeroil.com so noted...> I have 3 discounts stored for each item in the products.db.> > Getting the discount out of the products.db is no problem within a lineitems> context. I do a lookup with quantity and get the desired discount...BUT...> > Let say I have a items and the customer buys 20 pieces. In the products.db> the discount for 20 pieces is stored with 10%. I get this discount out but I> also get the discount for 10 pieces which is 5%. How can I only get the> discount out for 20 pieces?> > Here is the code I have used so far:> > [if (([quantity]=5) | ([quantity]>5))]> [then]> You get 10%> [/then]> > [if (([quantity]=10) | ([quantity]>10))]> [then]> You get 15%> [/then]> > [if (([quantity]=20) | ([quantity]>20))]> You get 20%> [/then]> > [/if]> > [/if]> > [/if][math show=f]discount=0[/math][showif [quantity]>4][math show=f]discount=10[/math][/showif][showif [quantity]>9][math show=f]discount=15[/math][/showif][showif [quantity]>19][math show=f]discount=20[/math][/showif]Discount is [discount]%Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------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:
on 6/21/01 1:52 PM, Nitai @ ComputerOil at nitai@computeroil.com so noted...> I have 3 discounts stored for each item in the products.db.> > Getting the discount out of the products.db is no problem within a lineitems> context. I do a lookup with quantity and get the desired discount...BUT...> > Let say I have a items and the customer buys 20 pieces. In the products.db> the discount for 20 pieces is stored with 10%. I get this discount out but I> also get the discount for 10 pieces which is 5%. How can I only get the> discount out for 20 pieces?> > Here is the code I have used so far:> > [if (([quantity]=5) | ([quantity]>5))]> [then]> You get 10%> [/then]> > [if (([quantity]=10) | ([quantity]>10))]> [then]> You get 15%> [/then]> > [if (([quantity]=20) | ([quantity]>20))]> You get 20%> [/then]> > [/if]> > [/if]> > [/if][math show=f]discount=0[/math][showif [quantity]>4][math show=f]discount=10[/math][/showif][showif [quantity]>9][math show=f]discount=15[/math][/showif][showif [quantity]>19][math show=f]discount=20[/math][/showif]Discount is [discount]%Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------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/
Rob Marquardt
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:
3.08 installer (2003)
Caching [include] files ... (1997)
WCS Newbie question (1997)
[BULK] [WebDNA] Security Images (Captcha) (2008)
Disappearing data (2002)
WebCat is different user (1999)
Summing fields (1997)
Problems with [Applescript] (1997)
Not really WebCat (1997)
multiple replace sku data (2003)
Nested tags count question (1997)
F3 crashing server (1997)
WebCat2b12 CGI Mac -- Problems propagating the cart through (1997)
protect tag on NT (1997)
Deleting Orders (1997)
[WebDNA] [PROTECT] - Log Out (2011)
Help!!!! (1997)
[WebDNA] List words with string delimiter (2017)
Cobalt and WebCatalog, do they work together? (2000)
[WebDNA] Website almost dead? (2016)