Re: Resetting a Formvariable

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35287
interpreted = N
texte = and you are *not* passing 'kwantity' as a formvar into the page? (if you *are*, AND you are using webcat-4 for sure, then perhaps your sys admin changed the secret global pref so that incoming formvars still overwrite [text] vars...?)Regarding the price issue, I recommend being stubborn and hashing out one detail at a time if necessary and post to the list every day until someone figures out why things don't work the way experts say they should... and constructing John P's suggestion of setting the price(s) on the fly so your users can fiddle w/quantities all they want and the price is always right. I remember posting really dumb issues over and over until someone finally figured out what I was doing that caused my woes... someone eventually gets it.-JohnGlenn Busbin wrote:> >is it because when you check the value of [quantity] you are within a > >[lineitems] loop? > > Yes, it is within a lineitems loop. > > [lineItems] > > SIZE=-1>[lineIndex] > [SKU] > [Name]
> [CommonName] > [Size] > $[format > .2f][price][/format] > [Inv] > > > [Aquantity]
> > [showif [Aquantity]>[Inv]] [text]kwantity=[Inv][/text][/showif] > > kwantity=[kwantity] > > > HREF=ShoppingCart.tpl?command=remove&db=POL.db&index=[lineIndex]&cart=[cart]>R > emove
> This Item
> >From Your Cart
> > [/lineItems] > > >try as a test all new names that leads to this test: > > > >[showif [Aquantity]>[Inv]] [text]kwantity=[Inv][/text][/showif] > > > >kwantity=[kwantity] > > I did. (See above.) In this test, the number of items in inventory [Inv] is > 9. If I place an order for 11 items, I get: > kwantity=9 > Aquantity=11 > > This is exactly the same result as with my previous attempts to understand > this problem. > > The problem with resetting the [quantity] formvariable *MUST* be related to > the way that [quantity] is passed from Results.tpl to ShoppingCart.tpl. > > Last week, I asked for help on a related matter. I want to have [price] > determined by the quantity ordered. The problem was that if I passed the > formvariable for [quantity] from Results.tpl to ShoppingCart.tpl as a text > variable, it allowed users to change the number ordered on ShoppingCart.tpl > from a large number (with a quantity discount) to a smaller number (and > still get the quantity discount). The only way I could solve this is by > having the [quantity] field displayed as hidden text and also as a plain, > unchangable variable. > > VALUE=[Aquantity]>[Aquantity] > > This is the only way I can get [quantity] passed from Results.tpl to > ShoppingCart.tpl AND to Invoice.tpl without either letting users change the > quantity ordered. It also prevents a mysterious 8-digit number from being > passed to the [quantity] field on Invoice.tpl. (I still don't know where > THAT comes from.) This works, but I admit it's not at all elegant and it > indicates a problem with the passing of the formvariable, but I don't know > what else to do. Everything else I tried failed. > > I appreciate the help from you guys. I'll get this whipped someday. > > Glenn > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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: Resetting a Formvariable (John Butler 2000)
  2. Re: Resetting a Formvariable (Glenn Busbin 2000)
  3. Re: Resetting a Formvariable (Glenn Busbin 2000)
  4. Re: Resetting a Formvariable (John Peacock 2000)
  5. Re: Resetting a Formvariable (John Butler 2000)
  6. Re: Resetting a Formvariable (John Butler 2000)
  7. Re: Resetting a Formvariable (Glenn Busbin 2000)
  8. Re: Resetting a Formvariable (Rob Marquardt 2000)
  9. Re: Resetting a Formvariable (Glenn Busbin 2000)
  10. Re: Resetting a Formvariable (Glenn Busbin 2000)
  11. Re: Resetting a Formvariable (Rob Marquardt 2000)
  12. Re: Resetting a Formvariable (WebDNA Support 2000)
  13. Re: Resetting a Formvariable (Anup Setty 2000)
  14. Re: Resetting a Formvariable (Kenneth Grome 2000)
  15. Re: Resetting a Formvariable (Glenn Busbin 2000)
  16. Re: Resetting a Formvariable (John Butler 2000)
  17. Re: Resetting a Formvariable (Glenn Busbin 2000)
  18. Re: Resetting a Formvariable (Glenn Busbin 2000)
  19. Re: Resetting a Formvariable (John Peacock 2000)
  20. Re: Resetting a Formvariable (John Butler 2000)
  21. Re: Resetting a Formvariable (James Howarth 2000)
  22. Resetting a Formvariable (Glenn Busbin 2000)
and you are *not* passing 'kwantity' as a formvar into the page? (if you *are*, AND you are using webcat-4 for sure, then perhaps your sys admin changed the secret global pref so that incoming formvars still overwrite [text] vars...?)Regarding the price issue, I recommend being stubborn and hashing out one detail at a time if necessary and post to the list every day until someone figures out why things don't work the way experts say they should... and constructing John P's suggestion of setting the price(s) on the fly so your users can fiddle w/quantities all they want and the price is always right. I remember posting really dumb issues over and over until someone finally figured out what I was doing that caused my woes... someone eventually gets it.-JohnGlenn Busbin wrote:> >is it because when you check the value of [quantity] you are within a > >[lineitems] loop? > > Yes, it is within a lineitems loop. > > [lineitems] > > SIZE=-1>[lineIndex] > [SKU] > [Name]
> [CommonName] > [Size] > $[format > .2f][price][/format] > [Inv] > > > [Aquantity]
> > [showif [Aquantity]>[Inv]] [text]kwantity=[Inv][/text][/showif] > > kwantity=[kwantity] > > > HREF=ShoppingCart.tpl?command=remove&db=POL.db&index=[lineIndex]&cart=[cart]>R > emove
> This Item
> >From Your Cart
> > [/lineItems] > > >try as a test all new names that leads to this test: > > > >[showif [Aquantity]>[Inv]] [text]kwantity=[Inv][/text][/showif] > > > >kwantity=[kwantity] > > I did. (See above.) In this test, the number of items in inventory [Inv] is > 9. If I place an order for 11 items, I get: > kwantity=9 > Aquantity=11 > > This is exactly the same result as with my previous attempts to understand > this problem. > > The problem with resetting the [quantity] formvariable *MUST* be related to > the way that [quantity] is passed from Results.tpl to ShoppingCart.tpl. > > Last week, I asked for help on a related matter. I want to have [price] > determined by the quantity ordered. The problem was that if I passed the > formvariable for [quantity] from Results.tpl to ShoppingCart.tpl as a text > variable, it allowed users to change the number ordered on ShoppingCart.tpl > from a large number (with a quantity discount) to a smaller number (and > still get the quantity discount). The only way I could solve this is by > having the [quantity] field displayed as hidden text and also as a plain, > unchangable variable. > > VALUE=[Aquantity]>[Aquantity] > > This is the only way I can get [quantity] passed from Results.tpl to > ShoppingCart.tpl AND to Invoice.tpl without either letting users change the > quantity ordered. It also prevents a mysterious 8-digit number from being > passed to the [quantity] field on Invoice.tpl. (I still don't know where > THAT comes from.) This works, but I admit it's not at all elegant and it > indicates a problem with the passing of the formvariable, but I don't know > what else to do. Everything else I tried failed. > > I appreciate the help from you guys. I'll get this whipped someday. > > Glenn > > ------------------------------------------------------------- > 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/ ------------------------------------------------------------- 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 Butler

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:

SEARCH Peram (2003) Search returns all, not 20 (1997) [isfolder] and [filename] (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) Clearly.home (1998) protect acting looney?? (2003) Goodbyes (2007) Thanks Grant (was: disappearing SKU (etc.) fields) (1998) Where has WebDNA shown up in your life? (2003) More questions about serial number dishing (1997) Fun with Dates - revisited (1997) Return records from another (1997) Credit card processing options. . . (1997) Search returns all, not 20 (1997) [isfile] ? (1997) Olin (1998) [WebDNA] Sending Email Problem (2008) accountnum using [listwords] (2001) [Webcat 2]Next (1997) Still having math problems (1997)