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 -- What formula are you using it in...? Is that shipCost? If so -- there was earlier discussion about quantity not being valid in shipCost - you need a [lineitems] loop to get to the individual items - which would get you to the 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 & Development Suite 453 | http://www.smithmicro.com San Diego, CA 92128 ******************************* 619.675.1106** PGP key available upon request. ** Associated Messages, from the most recent to the oldest:

    
  1. Re:Formulas.db / Quantity Discount problem (PCS Technical Support 1998)
  2. Re:Formulas.db / Quantity Discount problem (Paul Uttermohlen 1998)
  3. Re:Formulas.db / Quantity Discount problem (Jay Van Vark 1998)
Sounds like quantity is what is giving you an incorrect value -- What formula are you using it in...? Is that shipCost? If so -- there was earlier discussion about quantity not being valid in shipCost - you need a [lineitems] loop to get to the individual items - which would get you to the 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 & Development Suite 453 | http://www.smithmicro.com San 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:

hyperlinking unique input strings on the fly when displaying in HTML (2000) PCS Frames-Default page is solution! (1997) [ShowIf] and empty fields (1997) RAM problems, [appendfile] problems (1998) [SHOWIF AND/OR] (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Pop-up Menu (1998) 2nd WebCatalog2 Feature Request (1996) WebCat2b13MacPlugin - nested [xxx] contexts (1997) When is unitShipCost calculated? (1998) RE: WebCatalog2 for NT Beta Request (1997) Replace context problem ... (1997) DreamWeaver MX Bug (2002) WebCat 4 crashes WebStar / Shownext Links (2001) % (mod) was looping table rows (1999) [WebDNA] Migration from 6.2 to 7. Problems with writing to DB's (2012) WebCat editing, SiteGuard & SiteEdit (1997) listfiles sort?! (2005) Help! WebCat2 bug (1997) WebCat2b12 - nesting [tags] (1997)