Re: shippingTotal Challenge

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 40349
interpreted = N
texte = Cristián Tapia wrote: > > Hi, > > I'm working on a commerce site which shipping cost calculation goes beyond > my basic DNA knowledge. I would appreciate if anybody can give me a hand > on this. > > The challenge is: > > 1.- Every product in the DB has two fields to be considered on the final > ShipCost calculation. The first one is weight and second is called > volumetric weight.When you add the item to the cart, also add the weight and vweight as textA and textB.> > 2.- Inside my invoice template I must add the weight of all the products > in the order. That gives me one value. Lets call it Total Weight. Then I > need to do the same for the volumetric weight. That gives me another value > Total Volumetric. Then I need to compare both of them and use the higher > one to continue with the calculation. Lets call it Master WeightAt the top of your invoice page, do a [lineitems] loop and add up the individual values of textA and textB, ala[math]total_weight=0[/math] [math]total_vweight=0[/math] [lineitems] [math]total_weight=[total_weight]+[textA][/math] [math]total_vweight=[total_vweight]+[textA][/math] [/lineitems]> > - The next step is to use the Master Weight value to perform a series of > calculations based on shipping address, which finally should bring a > ShipCost to be added to the subtotal and get the long awaited > GrandTotalThen perform your logic to get the master weight and calculate the shipping cost and assign it using [setheader] to set the [shippingTotal] field. Now, you can display the cart with the correct information.John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: shippingTotal Challenge (John Peacock 2001)
  2. shippingTotal Challenge (ctapia@lemon.cl (Cristián Tapia) 2001)
Cristián Tapia wrote: > > Hi, > > I'm working on a commerce site which shipping cost calculation goes beyond > my basic DNA knowledge. I would appreciate if anybody can give me a hand > on this. > > The challenge is: > > 1.- Every product in the DB has two fields to be considered on the final > ShipCost calculation. The first one is weight and second is called > volumetric weight.When you add the item to the cart, also add the weight and vweight as textA and textB.> > 2.- Inside my invoice template I must add the weight of all the products > in the order. That gives me one value. Lets call it Total Weight. Then I > need to do the same for the volumetric weight. That gives me another value > Total Volumetric. Then I need to compare both of them and use the higher > one to continue with the calculation. Lets call it Master WeightAt the top of your invoice page, do a [lineitems] loop and add up the individual values of textA and textB, ala[math]total_weight=0[/math] [math]total_vweight=0[/math] [lineitems] [math]total_weight=[total_weight]+[textA][/math] [math]total_vweight=[total_vweight]+[textA][/math] [/lineitems]> > - The next step is to use the Master Weight value to perform a series of > calculations based on shipping address, which finally should bring a > ShipCost to be added to the subtotal and get the long awaited > GrandTotalThen perform your logic to get the master weight and calculate the shipping cost and assign it using [setheader] to set the [shippingTotal] field. Now, you can display the cart with the correct information.John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

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:

WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) suffix mapping for NT? (1997) hmmm (2006) WebCat Admin access w/ClearlyHome p.i. (1997) Mac Vs WindowsNT (1997) Counting LineItems (2000) 2.0Beta Command Ref (can't find this instruction) (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) Archive Problem (2000) fieldnamesdir=ra equivalent for [sql] (2002) [WebDNA] Mass email using WebDNA (2008) Date Sorting (1997) Problems passing [SKU] with $Replace in 2.0 (1997) Merging databases (1997) Help! WebCat2 bug (1997) Filemaker & WebCat (2001) Running _every_ page through WebCat-error.html (1997) [TEXT SECURE=T] (2000) Webcatalog quitting (1997) Bug Report, maybe (1997)