Formulas and Multiple Prices
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34679
interpreted = N
texte = OK. I know this sort of thing has been kicked around before, but I can'tfind a good solution in the archives. Maybe my search didn't find it, but...I'm trying to set prices for items based on the number of a particular itempurchased.Example:Buy less than 3 of ItemA and pay price1.Buy 3 to 5 ItemA's and pay price2.etc.I've tried two ways of using the Formulas.db to set price as follows:Name Formulaprice [showif [quantity]<3][lookupdb=mydata.db&lookInField=sku&value=[sku]&returnField=price1][/showif][showif [quantity]>2] [showif[quantity]<6][lookupdb=mydata.db&lookInField=sku&value=[sku]&returnField=price2][/showif][/showif][showif [quantity]>5] [lookupdb=mydata.db&lookInField=sku&value=[sku]&returnField=price3][/showif]I also tried:Name Formulaprice [showif [quantity]<3][price1][/showif][showif [quantity]>2] [showif [quantity]<6][price2][/showif][/showif][showif [quantity]>5][price3][/showif]The first one (with lookups) always returns price1 for ItemA no matter howmany are in the cart.The second one always shows a price of $0 for each item in the cart.Using a subtractive solution to reduce prices in the Invoice isn'tpractical in this case.Any leads?Thanks,Glenn-------------------------------------------------------------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:
|
- Formulas and Multiple Prices (Glenn Busbin 2000)
|
OK. I know this sort of thing has been kicked around before, but I can'tfind a good solution in the archives. Maybe my search didn't find it, but...I'm trying to set prices for items based on the number of a particular itempurchased.Example:Buy less than 3 of ItemA and pay price1.Buy 3 to 5 ItemA's and pay price2.etc.I've tried two ways of using the formulas.db to set price as follows:Name Formulaprice [showif [quantity]<3][lookupdb=mydata.db&lookInField=sku&value=[sku]&returnField=price1][/showif][showif [quantity]>2] [showif[quantity]<6][lookupdb=mydata.db&lookInField=sku&value=[sku]&returnField=price2][/showif][/showif][showif [quantity]>5] [lookupdb=mydata.db&lookInField=sku&value=[sku]&returnField=price3][/showif]I also tried:Name Formulaprice [showif [quantity]<3][price1][/showif][showif [quantity]>2] [showif [quantity]<6][price2][/showif][/showif][showif [quantity]>5][price3][/showif]The first one (with lookups) always returns price1 for ItemA no matter howmany are in the cart.The second one always shows a price of $0 for each item in the cart.Using a subtractive solution to reduce prices in the Invoice isn'tpractical in this case.Any leads?Thanks,Glenn-------------------------------------------------------------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/
Glenn Busbin
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:
Uh...can someone help me out with the b10? (1997)
Missing contexts on NT (1997)
Trouble Searching (1999)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
[WebDNA] PCI Vulnerability testing (2009)
[WebDNA] webdna.us (2008)
HTML Editors (1997)
Annoying character on writefile... (2004)
Logging purchases (1997)
emailer on Windows Beta 18 (1997)
Bug? (1997)
stumped (2001)
WC2b15 File Corruption (1997)
Include a big block of text (1997)
Running _every_ page through WebCat-error.html (1997)
[WebDNA] feature suggestion - long response (2011)
WebCat2b15MacPlugin - [protect] (1997)
[WebDNA] [OFF TOPIC] -NEW HTC EVO 4G and SMSI (2010)
Problem with ShoppingCart.tpl refresh (2000)
Need help with emailer- 2 issues (1997)