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 QTYLVL03 BN-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-2050 Apple Computer, Inc. Fax: (310)264-2044 Training Development Executive Cellular: (626)695-2895 2041 Colorado Avenue - Suite 325 Santa 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:

    
  1. Re: More help for discount pricing (Jerry Nielsen 1998)
  2. Re: More help for discount pricing (Peter Ostry 1998)
  3. More help for discount pricing (Jerry Nielsen 1998)
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 QTYLVL03 BN-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-2050 Apple Computer, Inc. Fax: (310)264-2044 Training Development Executive Cellular: (626)695-2895 2041 Colorado Avenue - Suite 325 Santa 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:

Apache/MySQL Authentication (2006) CommandSecurity? (1997) Format all of a sudden doesn't work (1997) WebCatalog/Mac 2.1b2 - PIXO (1997) shownext (1997) method of payment (1997) Just Testing (1997) no [search] with NT (1997) Initiating NewCart (1997) Multiple fields on 1 input (1997) Stopping bad HTML propagation ? (1997) NT Manual (1997) OT: Just for a waste of time (2003) [WriteFile] problems (1997) Mozilla/4. and Browser Info.txt (1997) temporary database? an aside (2000) Still Stumped on ShowNext...HELP! (1997) Add htmlarea 3 to SiteBuilder (2004) [OT] DOD again (2003) [WebDNA] WebDNA7 & Webmin (2013)