Re: Variable Prices

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19539
interpreted = N
texte = Thanks for the info. However, this only works on the ShoppingCart.tpl and Invoice.tpl. I would like to have it working on the results.tpl and detail.tpl also. Any suggestions????Thanks, MarkPCS Technical Support wrote:> >I am trying to setup a catalog so that the price is marked up from the > >cost with > >the markup depending on the cost. > > > >For example: > > if the cost is less the $100.00 then the markup would be 30% > > if the cost is between $100.01 and $200.00 then the markup would be 20% > > if the cost is between $200.01 and $300.00 then the markup would be 15% > > if the cost is over $300.01 then the markup would be 10% > > > >Can this be done through the formula.db and if so what would the formula be. > >Would I need to make any changes to any of my templates? > > Formulas.db is the right place to do this, and you would not need to change > any templates. The following should get you started: > > -- Formulas.db -- > price [math show=f]markup=.1[/math][ShowIf [price]<300][math > show=f]markup=.15[/math][ShowIf [price]<200][math > show=f]markup=.2[/math][/ShowIf][/ShowIf][ShowIf [price]<100][math > show=f]markup=.3[/math][/ShowIf][math][price]*markup[/math] > > This assumes the markup is 10%, then checks for <300, <200, <100, and > resets the markup accordingly, then finally calculates the price based on > whatever the markup landed on. > > Technical Support | ==== eCommerce and Beyond ==== > Pacific Coast Software | WebCatalog, WebMerchant, > 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, > San Diego, CA 92128 | Typhoon > 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Variable Prices (PCS Technical Support 1998)
  2. Re: Variable Prices (Mark Bergkvist 1998)
  3. Re: Variable Prices (PCS Technical Support 1998)
  4. Re: Variable Prices (Mark Bergkvist 1998)
  5. Re: Variable Prices (PCS Technical Support 1998)
  6. Variable Prices (Mark Bergkvist 1998)
  7. Re: Variable prices and Formulas.db (Grant Hulbert 1997)
  8. Variable prices and Formulas.db (Austin H. Spiegelman 1997)
Thanks for the info. However, this only works on the ShoppingCart.tpl and Invoice.tpl. I would like to have it working on the results.tpl and detail.tpl also. Any suggestions????Thanks, MarkPCS Technical Support wrote:> >I am trying to setup a catalog so that the price is marked up from the > >cost with > >the markup depending on the cost. > > > >For example: > > if the cost is less the $100.00 then the markup would be 30% > > if the cost is between $100.01 and $200.00 then the markup would be 20% > > if the cost is between $200.01 and $300.00 then the markup would be 15% > > if the cost is over $300.01 then the markup would be 10% > > > >Can this be done through the formula.db and if so what would the formula be. > >Would I need to make any changes to any of my templates? > > formulas.db is the right place to do this, and you would not need to change > any templates. The following should get you started: > > -- formulas.db -- > price [math show=f]markup=.1[/math][ShowIf [price]<300][math > show=f]markup=.15[/math][ShowIf [price]<200][math > show=f]markup=.2[/math][/ShowIf][/ShowIf][ShowIf [price]<100][math > show=f]markup=.3[/math][/ShowIf][math][price]*markup[/math] > > This assumes the markup is 10%, then checks for <300, <200, <100, and > resets the markup accordingly, then finally calculates the price based on > whatever the markup landed on. > > Technical Support | ==== eCommerce and Beyond ==== > Pacific Coast Software | WebCatalog, WebMerchant, > 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, > San Diego, CA 92128 | Typhoon > 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Mark Bergkvist

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:

[WebDNA] New request for websites that currently run WebDNA (2009) Sku numbers (1997) 2nd WebCatalog2 Feature Request (1996) Database Fields (1997) Searchable archives gone again??? (2000) WebCat2b15MacPlugin - showing [math] (1997) I've had it! (1999) FTP and [shell] (2003) Refering page (1998) Help name our technology! (1997) Encrypt question. (2000) Jimmy (1998) Poll Please (2002) Using Applescript to process WebCatalog functions (1998) Referrer from multiple entry points (1998) WCf2 and nested tags (1997) Multiple adding (1997) Text data with spaces in them... (1997) Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997) purchase.log file (1997)