Re: adding shipping cost

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18643
interpreted = N
texte = >Quick question - If I have a shipping scale that looks like the following: >up to $99.99 = $8.00 shipping/handling >$100.00 to 199.99 = $11.00 s/h >etc.Since you are probably going to have a long list of price breakdowns, the best solution here is to create a database with the price ranges in it, and then perform a search to get the right shipping charge. For clarity, this is preferable to a bunch of nested [ShowIf] tags.I'd create a database like this: -- ShipTable.db -- Amount Shipping 0.00 8.00 100.00 11.00 200.00 13.00..and I'd put a shipCost formula in like this: -- Formulas.db -- shipCost [search db=ShipTable.db&leAmountdata=[subtotal]&deAmountsort=1&Amounttype=num&max=1][fou nditems][Shipping][/founditems][/search]The search finds all the shipping charges up to the highest allowable charge, but since it sorts in descending order and returns only 1 item (max=1), it effectively finds only the 1 shipping charge that pertains.Make sure you don't type any extra carriage returns on that formula: it should be one big long line with a tab after the shipCost text. 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: adding shipping cost (PCS Technical Support 1998)
  2. adding shipping cost (Michael Di Filippo 1998)
  3. Re: Adding Shipping Costs based on percent of subtotal (Grant Hulbert 1997)
  4. Adding Shipping Costs based on percent of subtotal (McDonald, Jim 1997)
>Quick question - If I have a shipping scale that looks like the following: >up to $99.99 = $8.00 shipping/handling >$100.00 to 199.99 = $11.00 s/h >etc.Since you are probably going to have a long list of price breakdowns, the best solution here is to create a database with the price ranges in it, and then perform a search to get the right shipping charge. For clarity, this is preferable to a bunch of nested [showif] tags.I'd create a database like this: -- ShipTable.db -- Amount Shipping 0.00 8.00 100.00 11.00 200.00 13.00..and I'd put a shipCost formula in like this: -- formulas.db -- shipCost [search db=ShipTable.db&leAmountdata=[subtotal]&deAmountsort=1&Amounttype=num&max=1][fou nditems][Shipping][/founditems][/search]The search finds all the shipping charges up to the highest allowable charge, but since it sorts in descending order and returns only 1 item (max=1), it effectively finds only the 1 shipping charge that pertains.Make sure you don't type any extra carriage returns on that formula: it should be one big long line with a tab after the shipCost text. 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/ PCS Technical Support

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:

[SHOWIF AND/OR] (1997) version 2 for NT (1997) [WriteFile] problems (1997) Formvariable Heirarchy (2000) Almost a there but..bye bye NetCloak (1997) Search in 2 or more catalogs (1997) [WebDNA] divisible by 1 (2011) & in Lookups (1997) WebCatalog [FoundItems] Problem - LONG - (1997) Wierd thing in ViewOrder.tpl (1999) WebCatalog for Mac 2.0.1 Released (1997) $purchase vs [purchase] (1999) Stop the madness. (1997) Web Hosters with WebCatalog support (2000) WebCat2b12 - nesting [tags] (1997) Webstar 1.3.1 PPC (1997) Requiring that certain fields be completed (1997) A little help on e-mail (HELP!!! :-) ) (1998) WebCat2b13 Command Reference Doc error (1997) Permission Deny (2003)