Re: price formula
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 22382
interpreted = N
texte = I figured it out. I had to set howbig=[howbig]&textC=[howbig] on the same page that sent the add command. textC is used for the cart and [howbig] is used for the formula.db >Ok, I can now get the price to rise 1 when the size is XX-large. My >problem is that all the items in the shopping cart have the same size.>>Can you map out where along the way I convert the new field for size >that I made [howbig] instead of textC, back into textC and use the >addlineitem. Is it on the shopping cart page? where? >>The size is choosen on the details page, then sent to the shopping cart >page with the [howbig] field set to the size.>>Thanks. I'm almost there.>>>I've tried it and you're right. I've checked the code and I see that>>unfortunately the value of TextC is not set *before* the price formula >is>>calculated. This seems like a bug to me.>>>>The workaround is to pass a differently-named form variable (named>>anything, as long as it's not one of the lineitem pre-defined >variables),>>with the value XX-Large. Here it is with a form variable >fred=XX-Large>>>>price [math][price][showif [fred]=XX-Large]+1[/showif][/math]>>>>You can then use [SetLineItem] to set the value of textC later in the >template>______________________________________________________Get Your Private, Free Email at http://www.hotmail.com
Associated Messages, from the most recent to the oldest:
I figured it out. I had to set howbig=[howbig]&textC=[howbig] on the same page that sent the add command. textC is used for the cart and [howbig] is used for the formula.db >Ok, I can now get the price to rise 1 when the size is XX-large. My >problem is that all the items in the shopping cart have the same size.>>Can you map out where along the way I convert the new field for size >that I made [howbig] instead of textC, back into textC and use the >addlineitem. Is it on the shopping cart page? where? >>The size is choosen on the details page, then sent to the shopping cart >page with the [howbig] field set to the size.>>Thanks. I'm almost there.>>>I've tried it and you're right. I've checked the code and I see that>>unfortunately the value of TextC is not set *before* the price formula >is>>calculated. This seems like a bug to me.>>>>The workaround is to pass a differently-named form variable (named>>anything, as long as it's not one of the lineitem pre-defined >variables),>>with the value XX-Large. Here it is with a form variable >fred=XX-Large>>>>price
[math][price][showif [fred]=XX-Large]+1[/showif][/math]>>>>You can then use
[setlineitem] to set the value of textC later in the >template>______________________________________________________Get Your Private, Free Email at http://www.hotmail.com
Mike Jones
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:
WebCat2.0 acgi vs plugin (1997)
real beginner stumped (2000)
Encrypt Users.db problem (1998)
Re:no template caching (1997)
Hello??? (1997)
Okay, I give up... (1999)
Setting up shop (1997)
Limitations on fields? Server is crashing (1997)
log out (2001)
Requiring that certain fields be completed (1997)
Shopping cart problem (2003)
Database cloning- will the real -oRiGiNaL- please stand up (2003)
New command suggestion (1997)
RE: Contexts and Ampersands (1997)
[WebDNA] Error 500 with SUMM=T (2017)
2nd WebCatalog2 Feature Request (1996)
[WebDNA] [convertchars] and ascii problem (2010)
Suggestion: appendfounditems (2002)
[WebDNA] XML parsing issue with cdata (2012)
Newbie Tax Question (1997)