formula.db, adding option prices
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13147
interpreted = N
texte = I have a detail page that has radio buttons for customers to pickoptions for the product. These radio button options are variablesTextA, textb and textc for the shopping cart. They are added fine tothe shopping cart (via the $add&db=. . .)and show up as passed variablesto the shopping cart page (when I do a [formsvariable]).The formula.db equation works fine when I don't try to add additionalprices for product options. It works fine when I make it a formula andadd integers to the product price. It doesn't work when I try to do alookup on the textA,B,C value for the price delta on that option. Here's a sample of code that won't work in the formula.db for price.[math][lookupdb=inventory.db&lookInField=sku&value=[sku]&returnField=standardcost]+[lookupdb=option3.db&lookInField=optkey3&value=[textC]&returnField=pdelta3][/math]The option3 lookup formula works fine when I put it on the shoppingcartpage, outside of the formula.dbI'm afraid it is a catch 22 on the value of textC. The formula iscalculated before textC is passed to the next page or stored in theshopping cart. Is this happening? If so, how do I get around it?I have tried doing a [addlineitems] on the shopping cart page instead ofthe $add on the detail page (allowing easier passing of variables), butcouldn't get the [lineitems] to show on the same page. Should thiswork?Thanks in advance!Sandy
Associated Messages, from the most recent to the oldest:
I have a detail page that has radio buttons for customers to pickoptions for the product. These radio button options are variablesTextA, textb and textc for the shopping cart. They are added fine tothe shopping cart (via the $add&db=. . .)and show up as passed variablesto the shopping cart page (when I do a [formsvariable]).The formula.db equation works fine when I don't try to add additionalprices for product options. It works fine when I make it a formula andadd integers to the product price. It doesn't work when I try to do alookup on the textA,B,C value for the price delta on that option. Here's a sample of code that won't work in the formula.db for price.
[math][lookupdb=inventory.db&lookInField=sku&value=[sku]&returnField=standardcost]+[lookupdb=option3.db&lookInField=optkey3&value=[textC]&returnField=pdelta3][/math]The option3 lookup formula works fine when I put it on the shoppingcartpage, outside of the formula.dbI'm afraid it is a catch 22 on the value of textC. The formula iscalculated before textC is passed to the next page or stored in theshopping cart. Is this happening? If so, how do I get around it?I have tried doing a [addlineitems] on the shopping cart page instead ofthe $add on the detail page (allowing easier passing of variables), butcouldn't get the
[lineitems] to show on the same page. Should thiswork?Thanks in advance!Sandy
Sandra L. Pitner <76501.3521@CompuServe.COM>
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:
Number date (2006)
Wierd problem with 3.08 WIN Version (2000)
[WebDNA] WebDNA on LiveCD ... (2008)
Database Updates (1997)
WebCat editing, SiteGuard & SiteEdit (1997)
Date search - yes or no (1997)
TCPconnect & XML (2008)
WebCat2 several catalogs? (1997)
the dreaded unitShipCost (2003)
webCatalog, OSX, and WebStar (2001)
Hiding URL ? (1998)
Textarea Breaks (2000)
Why does WebCat do this? (2001)
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
unsubscribe (1997)
Can you do this??? and other stuff (1997)
Type 11 errors setting up WebCAt 2 (1997)
WAY Off-Topic (2004)
Register First (2000)
[ShowNext] (1997)