Re: Resending - Please help

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 22328
interpreted = N
texte = >We have a recycling fee here in Switzerland which has to be applied. I >solved this in the way that I have a entry in the products.db called >recycling and let Webcatalog do a lookup with the formulas.db and return >the field Recycling. It also loops trough each lineitem so that it adds it >up. Thats is working great. > >NOW, I need to do exactly the same with the shipping cost but with weight >this time. I don't care anymore if I have to put a entry in the products.db >for shipping or if Webcat is calculating it. > >I tried several things but to no success. As soon as I enter a formula with >shipCost in the formulas.db I calculates everything together. As stated in >the manual, shipCost is for calculating the whole order. > >All I need is to add up the weight of the ordered items, look it up in a >Datatable and spit out the price according to the weight.OK, I'll try to help. I don't understand some of what you're saying, because it sounds like you already have it solved. For instance, you're saying you need to calculate the total shipping cost for the order based on the weight of all the items, but you don't like the fact that the shipCost formula applies to everything together. Isn't that what you want, is to add up all items together?If you prefer to calculate the individual shipping cost for each item, then the formula you use is unitShipCost, which gets calculated automatically for each lineitem, multiplied by the quantity, and summed for the whole order. You can then set shipCost to 0.0 (because you don't want any *additional* cost applied above the lineitem unitShipCost) and you're done!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: Resending - Please help (PCS Technical Support 1999)
  2. Resending - Please help (Nitai 1998)
>We have a recycling fee here in Switzerland which has to be applied. I >solved this in the way that I have a entry in the products.db called >recycling and let Webcatalog do a lookup with the formulas.db and return >the field Recycling. It also loops trough each lineitem so that it adds it >up. Thats is working great. > >NOW, I need to do exactly the same with the shipping cost but with weight >this time. I don't care anymore if I have to put a entry in the products.db >for shipping or if Webcat is calculating it. > >I tried several things but to no success. As soon as I enter a formula with >shipCost in the formulas.db I calculates everything together. As stated in >the manual, shipCost is for calculating the whole order. > >All I need is to add up the weight of the ordered items, look it up in a >Datatable and spit out the price according to the weight.OK, I'll try to help. I don't understand some of what you're saying, because it sounds like you already have it solved. For instance, you're saying you need to calculate the total shipping cost for the order based on the weight of all the items, but you don't like the fact that the shipCost formula applies to everything together. Isn't that what you want, is to add up all items together?If you prefer to calculate the individual shipping cost for each item, then the formula you use is unitShipCost, which gets calculated automatically for each lineitem, multiplied by the quantity, and summed for the whole order. You can then set shipCost to 0.0 (because you don't want any *additional* cost applied above the lineitem unitShipCost) and you're done!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:

Intermitent problem using [referrer] (1997) emailer setup (1997) Version 4? (2000) Questions To Answer (1997) ShowNext Command (1997) Weird error message (2002) multiple product databases (1997) Generating Report Totals (1997) can WC render sites out? (1997) Umm...about those log files? (Off Topic) (1997) Logout? (1998) Problem: 3.0 doesn't update carts (1997) Extended [ConvertChars] (1997) listfiles-looking for slick solution (1997) Make sure I understand this??? (1997) RE: [WebDNA] Basic Search (2008) nesting limits? (1998) Question re: Format command (2000) Help with Repost Data msg from form (1997) hideif/showif causes error if wrapped around searches (2003)