More help for discount pricing
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 19083
interpreted = N
texte = Hello all you WebDNA geneticists out there.I need help with the infamous discount pricing problem.Here's a very truncated version of the database.SKU SHDESC PRLVL01 PRLVL02 PRLVL03 QTYLVL01 QTYLVL02 QTYLVL03BN-5418P Blue Vinyl Bag 20 19 18 11 23 49 BP-5915NL Black Vinyl Bag 19 18 17.5 11 23 49 BP-5215NL Red Vinyl Bag 19 18 17.5 11 23 49PRLVL01, PRLVL02, PRLVL03 are the prices.QTYLVL01, QTYLVL01, QTYLVL01 are the quantity levels at which the corresponding prices are triggered. i. e. for SKU=BN-5418P from 1 to 11 (QTYLVL01) the price is $20.00(PRLVL01), after quantity 23 the price is $19.00. What I need to do is test for the quantity entered in the shopping cart and set/lookup the price appropriately for the quantity * price calculation on the trial invoice page.My thought was to use nested [showif] contexts in a formula in the formulas.db database. I have even thought that I might use nested [showif] contexts on the page itself. Within each [showif] context I thought to use [lookup]s to look up the QTYLVl, compare it to the [quantity[lineindex]] on the shopping cart template and then look up the appropriate price in the database as well.One thing I came up with (that doesn't work, BTW) was[showif [quantity[lineindex]]>[lookup db=Catalog.txt&lookinfield=sku&value=[sku]&returnfield=QTYLVL01]] [PRLVL02][/showif]I am lost now. I need help.Jerry NielsenJerry N. Nielsen Voice: (310)264-2050Apple Computer, Inc. Fax: (310)264-2044Training Development Executive Cellular: (626)695-28952041 Colorado Avenue - Suite 325Santa Monica, CA 90404Learn about Apple products and technologies on the internet.Sign up for Learn and Earn today at http://training.apple.com/lae/^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Associated Messages, from the most recent to the oldest:
Hello all you WebDNA geneticists out there.I need help with the infamous discount pricing problem.Here's a very truncated version of the database.SKU SHDESC PRLVL01 PRLVL02 PRLVL03 QTYLVL01 QTYLVL02 QTYLVL03BN-5418P Blue Vinyl Bag 20 19 18 11 23 49 BP-5915NL Black Vinyl Bag 19 18 17.5 11 23 49 BP-5215NL Red Vinyl Bag 19 18 17.5 11 23 49PRLVL01, PRLVL02, PRLVL03 are the prices.QTYLVL01, QTYLVL01, QTYLVL01 are the quantity levels at which the corresponding prices are triggered. i. e. for SKU=BN-5418P from 1 to 11 (QTYLVL01) the price is $20.00(PRLVL01), after quantity 23 the price is $19.00. What I need to do is test for the quantity entered in the shopping cart and set/lookup the price appropriately for the quantity * price calculation on the trial invoice page.My thought was to use nested
[showif] contexts in a formula in the
formulas.db database. I have even thought that I might use nested
[showif] contexts on the page itself. Within each
[showif] context I thought to use
[lookup]s to look up the QTYLVl, compare it to the [quantity[lineindex]] on the shopping cart template and then look up the appropriate price in the database as well.One thing I came up with (that doesn't work, BTW) was[showif [quantity[lineindex]]>[lookup db=Catalog.txt&lookinfield=sku&value=[sku]&returnfield=QTYLVL01]] [PRLVL02][/showif]I am lost now. I need help.Jerry NielsenJerry N. Nielsen Voice: (310)264-2050Apple Computer, Inc. Fax: (310)264-2044Training Development Executive Cellular: (626)695-28952041 Colorado Avenue - Suite 325Santa Monica, CA 90404Learn about Apple products and technologies on the internet.Sign up for Learn and Earn today at http://training.apple.com/lae/^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jerry Nielsen
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:
Grant, please help me ... (1997)
using showpage and showcart commands (1996)
WebCatalog can't find database (1997)
Calendar using WebCatalog? (1997)
Integration with SQL (1997)
Re:Problem displaying search result (1997)
IIS4 (1998)
WC2.0 Memory Requirements (1997)
Carts & cookies (1999)
redirect not passing vars (2004)
You can't buy something twice... (1997)
WebCat editing, SiteGuard & SiteEdit (1997)
Emailer kaput? (2000)
Practice runs ? (1997)
Multiple catalog databases and showcart (1997)
[quantity] within formulas (1997)
Three new problems, maybe a fourth (1997)
spawn (1998)
E-Mailer (WebCatb15acgiMac) (1997)
docs for WebCatalog2 (1997)