Re: Price and Formula.db
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 45543
interpreted = N
texte = I think I have it solved. I was passing the Options variable from the Products page to the lineitems loop on the ShoppingCart page as [TextD] to get around the restrictions on variable names in a lineitems loop, but used [Woods] for the same value in Formulas.db. Therefore, when the lineitems loop called up Formulas.db, the lookup didn't have a value for [Woods]. If I used the same lookup outside a lineitems loop, even on ShoppingCarts.tpl, it worked correctly. This is what threw me.This is wrong in lineitems, but right outside lineitems:[lookup db=Woods.db&lookinfield=Woods&value=[URL][Woods][/URL]&returnfield=ExtraCost]This is right in lineitems:[lookup db=Woods.db&lookinfield=Woods&value=[URL][TextD][/URL]&returnfield=ExtraCost]This works:Name FormulaPrice [Math][lookup db=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]+([lookup db=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]*[lookup db=Woods.db&lookinfield=Woods&value=[URL][TextD][/URL]&returnfield=ExtraCost])[/Math]It's not at all intuitive and the docs are damn little help. It would be just as secure to allow Price to be changed by a formula within the lineitems loop.I hope this helps someone else. I doubt this is unique to my experience.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/
Associated Messages, from the most recent to the oldest:
I think I have it solved. I was passing the Options variable from the Products page to the lineitems loop on the ShoppingCart page as [TextD] to get around the restrictions on variable names in a lineitems loop, but used [Woods] for the same value in formulas.db. Therefore, when the lineitems loop called up formulas.db, the lookup didn't have a value for [Woods]. If I used the same lookup outside a lineitems loop, even on ShoppingCarts.tpl, it worked correctly. This is what threw me.This is wrong in lineitems, but right outside lineitems:[lookup db=Woods.db&lookinfield=Woods&value=[url][Woods][/URL]&returnfield=ExtraCost]This is right in lineitems:[lookup db=Woods.db&lookinfield=Woods&value=[url][TextD][/URL]&returnfield=ExtraCost]This works:Name FormulaPrice [math][lookup db=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]+([lookup db=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]*[lookup db=Woods.db&lookinfield=Woods&value=[url][TextD][/URL]&returnfield=ExtraCost])[/Math]It's not at all intuitive and the docs are damn little help. It would be just as secure to allow Price to be changed by a formula within the lineitems loop.I hope this helps someone else. I doubt this is unique to my experience.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/
Glenn Busbin
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:
taxTotal, grandTotal (1997)
all records returned. (1997)
[date format] w/in sendmail (1997)
Mac v. NT (1998)
Problems getting parameters passed into email. (1997)
WebCat2 - storing unformatted date data? (1997)
Question re: FlushDatabases (1997)
Weird [blank] interpretation (1999)
FYI: Upgrading to 4.0 on Windoze 98 (2000)
OT: WebDNA and LINUX (2004)
Permissions (2000)
HELP!!! (1998)
WebCat2 Append problem (B14Macacgi) (1997)
[/application] error? (1997)
WebCatalog NT beta 18 now available (1997)
Frames (1997)
Out of the woodwork (2007)
Add to a filename in multifile upload (2002)
RE: Automatic Forwarding using WebCat (1997)
Add message to Order (1997)