Re: Calculating Shipping

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13965
interpreted = N
texte = >> For the purposes of the web site, shipping is 6.5% of the order >>total. My formula for this is: > >>shipCost [math][subtotal]*.065[/math] > >>This works just fine, but now I need to make the shipping $6.50 , or 6.5% of >>the order, whichever is greater. How do I do this? > >Try this: > >[showif >[math][subtotal]*.065[/math]>6.50][math][subtotal]*.065[/math][/showif][hid eif [ >math][subtotal]*.065[/math]>6.50]6.50[/hideif]Perfect! But i still must be missing something... what is the interaction between shipping and tax rate? When I have an order that is non taxable, the shipping formula works, but when I have a taxable order, the shipping formula doesn't work...My formulas: price [lookup db=gmassize.txt&lookInField=SKU&value=[sku]&returnField=Price] taxRate [math][showif [ShiptoState]=NJ]6.00+[/showif]0.00[math] shipCost [showif [math][subtotal]*.065[/math]>6.50][math][subtotal]*.065[/math][/showif][hide if [math][subtotal]*.065[/math]>6.50]6.50[/hideif] unitShipCost [lookup db=gmassize.txt&lookInField=sku&value=[sku]&returnField=unitShipCost]lets say i order $630.00 with a shiptostate of CA: subtotal=$630.00 tax =$0.00 (at 0.00%) shipping = $40.95 Total = $670.95 (CORRECT!!!)BUT if I order with a shiptostate of NJ: subtotal=$630.00 tax =$37.80 (at 6.00%) shipping = $6.50 Total = $674.30 (INCORRECT!!!)This ONLY happens the first time I push Purchase from the show cart page. If I click the back button, and then push the purchase button again, the shipping will figure correctly ($40.95) and give the correct total ($708.75). HELP. please.Brian B. Burton Associated Messages, from the most recent to the oldest:

    
  1. Re: StoreBuilder: ups.com stopped calculating shipping !! (Scott Anderson 2003)
  2. StoreBuilder: ups.com stopped calculating shipping !! (Chris List Recipient 2003)
  3. Re: Is WebCat 3.0 necessary for calculating shipping? (Kenneth Grome 2000)
  4. Is WebCat 3.0 necessary for calculating shipping? (Christopher Feyrer 2000)
  5. Re: calculating shipping costs by a sum of weights (Tim Taylor 1999)
  6. calculating shipping costs by a sum of weights (John Butler 1999)
  7. Recalculating Shipping Costs (McDonald, Jim 1997)
  8. Re: Calculating Shipping (Brian B. Burton 1997)
  9. Calculating Shipping (Brian B. Burton 1997)
  10. Re: Calculating Shipping (Kenneth Grome 1997)
  11. Re: Calculating Shipping charges for multiple items andqtys > 1 (Kenneth Grome 1997)
  12. Calculating Shipping charges for multiple items and qtys > 1 (updates@virtualrep.com (Updates) 1997)
>> For the purposes of the web site, shipping is 6.5% of the order >>total. My formula for this is: > >>shipCost [math][subtotal]*.065[/math] > >>This works just fine, but now I need to make the shipping $6.50 , or 6.5% of >>the order, whichever is greater. How do I do this? > >Try this: > >[showif >[math][subtotal]*.065[/math]>6.50][math][subtotal]*.065[/math][/showif][hid eif [ >math][subtotal]*.065[/math]>6.50]6.50[/hideif]Perfect! But i still must be missing something... what is the interaction between shipping and tax rate? When I have an order that is non taxable, the shipping formula works, but when I have a taxable order, the shipping formula doesn't work...My formulas: price [lookup db=gmassize.txt&lookInField=SKU&value=[sku]&returnField=Price] taxRate [math][showif [ShiptoState]=NJ]6.00+[/showif]0.00[math] shipCost [showif [math][subtotal]*.065[/math]>6.50][math][subtotal]*.065[/math][/showif][hide if [math][subtotal]*.065[/math]>6.50]6.50[/hideif] unitShipCost [lookup db=gmassize.txt&lookInField=sku&value=[sku]&returnField=unitShipCost]lets say i order $630.00 with a shiptostate of CA: subtotal=$630.00 tax =$0.00 (at 0.00%) shipping = $40.95 Total = $670.95 (CORRECT!!!)BUT if I order with a shiptostate of NJ: subtotal=$630.00 tax =$37.80 (at 6.00%) shipping = $6.50 Total = $674.30 (INCORRECT!!!)This ONLY happens the first time I push Purchase from the show cart page. If I click the back button, and then push the purchase button again, the shipping will figure correctly ($40.95) and give the correct total ($708.75). HELP. please.Brian B. Burton Brian B. Burton

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:

New Command prefs ... (1997) Error Lob.db records error message not name (1997) Emailer (WebCat2) (1997) [Listfiles] vs Netfinder (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) how is this possible (2000) Emailer Question (1998) Problem displaying search result (1997) How To question on setting up downloads (1997) BGcolor (1997) 'bot Q (2000) Help with database strategy (1998) Redirect and passing more than one variable... (2002) won't serve .tpl (2000) WebCat2 beta FTP site (1997) Using Plug-In while running 1.6.1 (1997) WebCatalog2 Feature Feedback (1996) WebCat2 several catalogs? (1997) Searching multiple fields (1997) Webcat & SIMS (1998)