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:
WC on Mac OS X or Mac OS X Server 2.x (2001)
PCS Frames (1997)
Emailer help....! (1997)
Emailer tracking (1997)
SOP for WebDNA talk (2004)
Sendmail and SMTP AUTH (2005)
Re:trouble (1997)
SIMS setup (1998)
[WebDNA] BBEdit Codeless Language Module for WebDNA (2009)
PSC recommends what date format yr 2000??? (1997)
WebTen and WebCat (1997)
[TaxableTotal] - not working with AOL and IE (1997)
Showing unopened cart (1997)
Re[2]: Date Time Oddness (1999)
GoLive CyberStudio 1.0.1 (1997)
Logging purchases (1997)
[searchString] (1997)
problem with [include] and Web*/SSL 3.0.1 (1998)
form data submission gets truncated (1997)
[input] questions (1997)