Re:Formulas.db / Quantity Discount problem
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16768
interpreted = N
texte = Sounds like quantity is what is giving you an incorrect value -- Whatformula are you using it in...? Is that shipCost? If so -- there wasearlier discussion about quantity not being valid in shipCost - you need a[lineitems] loop to get to the individual items - which would get you tothe quantity...Does this make sense...?>Hi All,>>[showif] does not seem to be working for me in the formulas.db.>>I am trying to setup a formula for price that subtracts a discount ammount>from the regular price if the quantity is greater than a certain ammount.>>This works when I enter it on the invoice.tmpl page:>[math][lookup>db=z-b.db&lookInField=sku&value=[sku]&returnField=peritemprice][showif>[quantity]>[pricebreakpoint]]-[lookup>db=z-b.db&lookInField=sku&value=[sku]&returnField=discountammount][/showif]0+0[>/>math]>>But when I put it in the Formulas.db it returns the regular price less the>discount ammount regardless of the quantity. It seems to be ignoring the>[showif] tag that qualifies the quantity.>>Any ideas?>>TIA, PaulJay Van Vark *******************************Pacific Coast Software | eCommerce (WebCatalog)11770 Bernardo Plaza Court | Site Hosting & DevelopmentSuite 453 | http://www.smithmicro.comSan Diego, CA 92128 *******************************619.675.1106** PGP key available upon request. **
Associated Messages, from the most recent to the oldest:
Sounds like quantity is what is giving you an incorrect value -- Whatformula are you using it in...? Is that shipCost? If so -- there wasearlier discussion about quantity not being valid in shipCost - you need a
[lineitems] loop to get to the individual items - which would get you tothe quantity...Does this make sense...?>Hi All,>>
[showif] does not seem to be working for me in the
formulas.db.>>I am trying to setup a formula for price that subtracts a discount ammount>from the regular price if the quantity is greater than a certain ammount.>>This works when I enter it on the invoice.tmpl page:>
[math][lookup>db=z-b.db&lookInField=sku&value=[sku]&returnField=peritemprice][showif>[quantity]>[pricebreakpoint]]-[lookup>db=z-b.db&lookInField=sku&value=[sku]&returnField=discountammount][/showif]0+0[>/>math]>>But when I put it in the
formulas.db it returns the regular price less the>discount ammount regardless of the quantity. It seems to be ignoring the>
[showif] tag that qualifies the quantity.>>Any ideas?>>TIA, PaulJay Van Vark *******************************Pacific Coast Software | eCommerce (WebCatalog)11770 Bernardo Plaza Court | Site Hosting & DevelopmentSuite 453 | http://www.smithmicro.comSan Diego, CA 92128 *******************************619.675.1106** PGP key available upon request. **
Jay Van Vark
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:
Re[2]: Bugs still *not* fixed as promised ... (2000)
Languages (1997)
[showif]/[hideif] question (1997)
Trigger alternatives please ... (2004)
How does WebCatalog search the database? (1997)
Bug Report, maybe (1997)
WebCat & Backoffice Solution? (2000)
Encrypt question. (2000)
WC2.0 Memory Requirements (1997)
SENDMAIL erreur 450 (2003)
Server slowing down. (1997)
WC TableGrinder (1997)
Parameter Problem (1998)
Summing fields (1997)
Multiple Ad databases? (1997)
Mac 4.0b2 Installer Problems (2000)
ListFiles and .DS_Store (2004)
page redirect in webDNA (1997)
send mail problem? (1997)
Nested tags count question (1997)