Re: Adding Shipping Costs based on percent of subtotal

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14777
interpreted = N
texte = > I am looking for a way to add shipping costs based on different > percentages which are calculated on the outcome of the subtotal. The way > it needs to work is to allow the user to select an option menu (much like > the options for shipping method in the General Store) based on the > following subtotal when it appears on the ShoppingCart.tpl: > > $499.99 or less - 4% > $500.00 - $1499.00 - 3% > $1500.00 or more - 2%Put the following into your formulas.db file (all one line, no carriage returns, tab after shipCost). Make sure you replace any existing shipCost formula that might already exist in your formulas.shipCost [math show=f]rate=.04[/math][showif [subtotal]>499.99][math show=f]rate=.03[/math][/showif][showif [subtotal]>1499.99][math show=f]rate=.02[/math][/showif][math][subtotal]*rate[/math]This should work with v2.0.1, which added the ability to 'hide' math results with show=F.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== 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: Adding Shipping Costs based on percent of subtotal (Grant Hulbert 1997)
  2. Adding Shipping Costs based on percent of subtotal (McDonald, Jim 1997)
> I am looking for a way to add shipping costs based on different > percentages which are calculated on the outcome of the subtotal. The way > it needs to work is to allow the user to select an option menu (much like > the options for shipping method in the General Store) based on the > following subtotal when it appears on the ShoppingCart.tpl: > > $499.99 or less - 4% > $500.00 - $1499.00 - 3% > $1500.00 or more - 2%Put the following into your formulas.db file (all one line, no carriage returns, tab after shipCost). Make sure you replace any existing shipCost formula that might already exist in your formulas.shipCost [math show=f]rate=.04[/math][showif [subtotal]>499.99][math show=f]rate=.03[/math][/showif][showif [subtotal]>1499.99][math show=f]rate=.02[/math][/showif][math][subtotal]*rate[/math]This should work with v2.0.1, which added the ability to 'hide' math results with show=F.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== 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/ Grant Hulbert

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:

[random] only for 1-100??? (1997) Math (1997) Cool! formulas (1998) Separate SSL Server (1997) WebCatb15 Mac CGI -- [purchase] (1997) docs for WebCatalog2 (1997) Guestbook (2000) [WebDNA] [OT] Merchant Provider Suggestions (2008) SQL Ref. (1999) NT - Thanks and Taxes (1997) MS Bug (2003) Newbie Help (2003) OSX Continued (2000) Value Lists From Filemaker Pro (1999) syntax question, not in online refernce (1997) Claris HomePage messes up the code (1997) Multiple catalog databases and showcart (1997) WebDNA color code chart - oops (2002) HELP WITH DATES (1997) Help getting [shownext] to increment (2003)