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][hideif [>math][subtotal]*.065[/math]>6.50]6.50[/hideif]Perfect!But i still must be missing something... what is the interaction betweenshipping and tax rate? When I have an order that is non taxable, theshipping formula works, but when I have a taxable order, the shippingformula 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][hideif [math][subtotal]*.065[/math]>6.50]6.50[/hideif]unitShipCost [lookupdb=gmassize.txt&lookInField=sku&value=[sku]&returnField=unitShipCost]lets say i order $630.00 with a shiptostate of CA:subtotal=$630.00tax =$0.00 (at 0.00%)shipping = $40.95Total = $670.95 (CORRECT!!!)BUT if I order with a shiptostate of NJ:subtotal=$630.00tax =$37.80 (at 6.00%)shipping = $6.50Total = $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, theshipping 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:
>> 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][hideif [>math][subtotal]*.065[/math]>6.50]6.50[/hideif]Perfect!But i still must be missing something... what is the interaction betweenshipping and tax rate? When I have an order that is non taxable, theshipping formula works, but when I have a taxable order, the shippingformula 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][hideif
[math][subtotal]*.065[/math]>6.50]6.50[/hideif]unitShipCost [lookupdb=gmassize.txt&lookInField=sku&value=[sku]&returnField=unitShipCost]lets say i order $630.00 with a shiptostate of CA:subtotal=$630.00tax =$0.00 (at 0.00%)shipping = $40.95Total = $670.95 (CORRECT!!!)BUT if I order with a shiptostate of NJ:subtotal=$630.00tax =$37.80 (at 6.00%)shipping = $6.50Total = $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, theshipping 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)