Fixed: Problem getting shipping to calculate

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 47473
interpreted = N
texte = Yeah, you're right. This code does what I want. I need to move the variable [ordered] above everything, but the main thing was I had to decrease the amount of [ordered] in the [lineitems] loop with the [removelineitems]. Thanks for the suggestion...[math show=f]ordered=0[/math] [showif [changed]=T] [lineitems] [showif [texte]=on] [math show=f]ordered=[ordered]-[quantity][/math] [removelineitem db=catalog.db&cart=[GetCookie SessionID]&index=[lineindex]] [/showif] [/lineitems][/showif] [lineitems] [math show=f]ordered=[ordered]+[quantity][/math][/lineitems] On Wednesday, February 5, 2003, at 12:44 PM, Donovan wrote:> Will, this is probably the order in which things are happening. > Since you posted snippets its hard to tell what order things are > happening in. > > Donovan > > > > WJ Starck wrote: > >> I have a fairly simply shipping set up: If the customer orders 1 >> item, they are charged for shipping - more than 1, and shipping is >> free. >> >> The page has a form that submits the page to itself in case the >> shopper wants to delete items, change quantities, etc. >> >> It all works great, except under one instance: If a customer adds 2 >> *different* items, and then deletes one, the shipping for the >> remaining item is calculating at 0.00. It works OK if they add >> quantity 2 of an item, and then change the quantity back to 1, >> however. And wouldn't you know it, those stinkers have figured it out >> and are taking advantage of the bug. >> >> Here is the code: >> >> >> >> [lineitems] >> [showif [texte]=on] >> [removelineitem db=catalog.db&cart=[GetCookie >> SessionID]&index=[lineindex]] >> [/showif] >> [/lineitems] >> [/showif] >> >> >> >> [math show=f]ordered=0[/math] >> >> [lineitems] [math show=f]ordered=[ordered]+[quantity][/math] >> [/lineitems] >> [showif [shipvia]=priority] >> [showif [ordered]>1][setheader cart=[GetCookie >> SessionID]&db=catalog.db]shippingTotal=0.00[/setheader][/showif] >> [/showif] >> >> The [removelineitem] happens in the cart and on the page OK, but the >> variable [ordered] is still equalling 2 somehow on the page (in the >> case where the shopper has added 2 and then deleted one item), so >> shippingTotal is calculating wrong. >> >> I'm stumped, I'm sure I'm missing something simple... >> >> Thanks, >> >> -- >> >> Will Starck >> NovaDerm Skincare Science >> http://www.novaderm.com >> wjs@novaderm.com >> >> >> ------------------------------------------------------------- >> 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://webdna.smithmicro.com/ >> > > -- > -Donovan Brooke > -Administrator of IT / > -Assc. Art Director > -Creative Services > -Epsen Hillmer Graphics > > -402.342.1169 > > > > > ------------------------------------------------------------- > 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://webdna.smithmicro.com/ > > --Will Starck NovaDerm Skincare Science http://www.novaderm.com wjs@novaderm.com ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Fixed: Problem getting shipping to calculate (WJ Starck 2003)
Yeah, you're right. This code does what I want. I need to move the variable [ordered] above everything, but the main thing was I had to decrease the amount of [ordered] in the [lineitems] loop with the [removelineitems]. Thanks for the suggestion...[math show=f]ordered=0[/math] [showif [changed]=T] [lineitems] [showif [texte]=on] [math show=f]ordered=[ordered]-[quantity][/math] [removelineitem db=catalog.db&cart=[GetCookie SessionID]&index=[lineindex]] [/showif] [/lineitems][/showif] [lineitems] [math show=f]ordered=[ordered]+[quantity][/math][/lineitems] On Wednesday, February 5, 2003, at 12:44 PM, Donovan wrote:> Will, this is probably the order in which things are happening. > Since you posted snippets its hard to tell what order things are > happening in. > > Donovan > > > > WJ Starck wrote: > >> I have a fairly simply shipping set up: If the customer orders 1 >> item, they are charged for shipping - more than 1, and shipping is >> free. >> >> The page has a form that submits the page to itself in case the >> shopper wants to delete items, change quantities, etc. >> >> It all works great, except under one instance: If a customer adds 2 >> *different* items, and then deletes one, the shipping for the >> remaining item is calculating at 0.00. It works OK if they add >> quantity 2 of an item, and then change the quantity back to 1, >> however. And wouldn't you know it, those stinkers have figured it out >> and are taking advantage of the bug. >> >> Here is the code: >> >> >> >> [lineitems] >> [showif [texte]=on] >> [removelineitem db=catalog.db&cart=[GetCookie >> SessionID]&index=[lineindex]] >> [/showif] >> [/lineitems] >> [/showif] >> >> >> >> [math show=f]ordered=0[/math] >> >> [lineitems] [math show=f]ordered=[ordered]+[quantity][/math] >> [/lineitems] >> [showif [shipvia]=priority] >> [showif [ordered]>1][setheader cart=[GetCookie >> SessionID]&db=catalog.db]shippingTotal=0.00[/setheader][/showif] >> [/showif] >> >> The [removelineitem] happens in the cart and on the page OK, but the >> variable [ordered] is still equalling 2 somehow on the page (in the >> case where the shopper has added 2 and then deleted one item), so >> shippingTotal is calculating wrong. >> >> I'm stumped, I'm sure I'm missing something simple... >> >> Thanks, >> >> -- >> >> Will Starck >> NovaDerm Skincare Science >> http://www.novaderm.com >> wjs@novaderm.com >> >> >> ------------------------------------------------------------- >> 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://webdna.smithmicro.com/ >> > > -- > -Donovan Brooke > -Administrator of IT / > -Assc. Art Director > -Creative Services > -Epsen Hillmer Graphics > > -402.342.1169 > > > > > ------------------------------------------------------------- > 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://webdna.smithmicro.com/ > > --Will Starck NovaDerm Skincare Science http://www.novaderm.com wjs@novaderm.com ------------------------------------------------------------- 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://webdna.smithmicro.com/ WJ Starck

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:

This list needs a digest: rant, rave... (1997) Help! WebCat2 bug (1997) ups quickcost [repost] (1999) javascript implementation of MD5 algorithm (2003) Firesite and [referrer] atg broke (1997) [/application] error? (1997) 2.0.1 new commands and contexts (1997) RE: protect tag on NT (1997) Mac: [ListFiles] bug alert (1997) More Hide IFs (2000) ShowNext (1997) possible, WebCat2.0 and checkboxes-restated (1997) Looping Search Results - Duh! (2000) WebMerchant still not working!! (1999) [SearchString] usage (1997) WebCat b13 CGI -shownext- (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) form data submission gets truncated (1997) Re2: Calculating multiple shipping... (1997) Email within tmpl ? (1997)