Problem getting shipping to calculate
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 47466
interpreted = N
texte = 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 StarckNovaDerm Skincare Sciencehttp://www.novaderm.comwjs@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:
|
- Problem getting shipping to calculate (WJ Starck 2003)
|
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 StarckNovaDerm Skincare Sciencehttp://www.novaderm.comwjs@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:
converting tabs (1997)
Problems with [Search] param - Mac Plugin b15 (1997)
StoreBuilder Shopping Cart (2000)
Questions To Answer (1997)
OT: PDA Browser Emulator (2006)
[cart] not being interpreted inside [founditems] (1997)
[math date]: Arrrggh! (2003)
WebCatalog for Postcards ? (1997)
Writing [raw] to a file (2000)
WebCatalog f2 Installation (1997)
Running _every_ page through WebCat ? (1997)
Nutscrape Doesn't Render Right (2002)
WebCat 5 Intranet Question (2003)
Why did this copyfile stop working? (2004)
.eml files (2001)
WebStar SSL and WebCatalog conflict? (1999)
Upgrading old WebCat Database Files (1997)
Show if time tags (1997)
Search design (1997)
2.0 Info (1997)