Re: Calculating multiple shipping...

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10370
interpreted = N
texte = >Example: Someone might order 3 Deelywoppers. The cost to ship 1 >Deelywopper is $5. Each additional one is $.30. So the total ship cost is >$5.60. How do I get WebCatalog to calculate this for me?This is the standard shipping model for WebCatalog 1.6.1Put the 0.30 price into the unitShipCost field of each product in the database Set shipCost to 5.00 at either $ShowCart or $Purchase timeWebCatalog 1.6.1 uses this base shipping cost for entire order + each item's shipping cost model in a somewhat simplistic manner compared to WebCatalog Release 2.0---------- WebCatalog 2.0 explanation -------- WebCat2 can evaluate a formula of your choice for price, unitShipCost, taxRate, and shipCost -- the GeneralStore gives an example that chooses different base shipCosts based on a Ground/Air/NextDay popup. If no formula is present (for price, let's say), then the amount is simply looked up in the product database under that SKU's price field.You would put something like the following into the Formulas.db file, and make sure the visitor chooses Air/Ground/NextDay before putting stuff in the cart:shipCost [showif [shipVia]=Ground]5.00[/showif][showif [shipVia]=Air]7.00[/showif] unitShipCost [showif [shipVia]=Ground]0.30[/showif][showif [shipVia]=Air]0.80[/showif]This is a simple example; you can do [lookups] and [math] in those formulas too. Any WebDNA script will work. For example, if you wanted to look up that particular SKU's unitShipCost instead of fixing it at $.30, you could use the following formula:unitShipCost [lookup db=catalog.txt&lookInField=SKU&value=[sku]&returnField=unitShipCost]You could throw some [math] around that formula, or look in a different field based on what [shipVia] was set in the shopping cart.--Grant Hulbert, connected via Etheric-Net from behind Hale-Bopp (At least that's what I told Mom when I told her we were going on 'vacation') ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re2: Calculating multiple shipping... (ben 1997)
  2. Re: Calculating multiple shipping... (Kenneth Grome 1997)
  3. Re: Calculating multiple shipping... (Grant Hulbert 1997)
  4. Calculating multiple shipping... (ben 1997)
>Example: Someone might order 3 Deelywoppers. The cost to ship 1 >Deelywopper is $5. Each additional one is $.30. So the total ship cost is >$5.60. How do I get WebCatalog to calculate this for me?This is the standard shipping model for WebCatalog 1.6.1Put the 0.30 price into the unitShipCost field of each product in the database Set shipCost to 5.00 at either $ShowCart or $Purchase timeWebCatalog 1.6.1 uses this base shipping cost for entire order + each item's shipping cost model in a somewhat simplistic manner compared to WebCatalog Release 2.0---------- WebCatalog 2.0 explanation -------- WebCat2 can evaluate a formula of your choice for price, unitShipCost, taxRate, and shipCost -- the GeneralStore gives an example that chooses different base shipCosts based on a Ground/Air/NextDay popup. If no formula is present (for price, let's say), then the amount is simply looked up in the product database under that SKU's price field.You would put something like the following into the formulas.db file, and make sure the visitor chooses Air/Ground/NextDay before putting stuff in the cart:shipCost [showif [shipVia]=Ground]5.00[/showif][showif [shipVia]=Air]7.00[/showif] unitShipCost [showif [shipVia]=Ground]0.30[/showif][showif [shipVia]=Air]0.80[/showif]This is a simple example; you can do [lookups] and [math] in those formulas too. Any WebDNA script will work. For example, if you wanted to look up that particular SKU's unitShipCost instead of fixing it at $.30, you could use the following formula:unitShipCost [lookup db=catalog.txt&lookInField=SKU&value=[sku]&returnField=unitShipCost]You could throw some [math] around that formula, or look in a different field based on what [shipVia] was set in the shopping cart.--Grant Hulbert, connected via Etheric-Net from behind Hale-Bopp (At least that's what I told Mom when I told her we were going on 'vacation') ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ 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:

Where's Cart Created ? (1997) Extended [ConvertChars] (1997) [cart]'s ever get recycled? (2000) RE: IIS4b2 and WebCatalog b19 (1997) Re2: frames & carts (1997) Protect vs Authenicate (1997) searching for items that begin with a number (2004) selectively replacing records within a [founditems] (2000) writing db to disk (1997) Quitting WebMerchant ? (1997) [WebDNA] reverse rank=off (2008) Here's how to kill a Butler Database. (1997) Emailer and encryption (1997) Kaaaaahhhhhhhnnnnnnn! (1997) hmmm (2006) please unsubscribe me! (2000) More Shopping Cart Problems (2000) [WebDNA] grep again (2010) URL encoding -- still a problem (1998) WebCat2: multiple currency support (1997)