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:
The Form authentication trick (2000)
SKU lookup (1997)
Code shows all, but should not (2003)
4.0x on production server (2000)
page redirect in webDNA (1997)
Date search - yes or no (1997)
Recursion & WebDNA (1999)
[WebDNA] Seriously what is wrong here? (2011)
WebCatalog for guestbook ? (1997)
IE Cache Problems... (1999)
FREE Web Server Monitor FREE (1997)
PCS Emailer's role ? (1997)
Problem (1997)
Missing Cart Information (2003)
[WebDNA] Installation problem (Debian 6 64bit + Lighttpd) (2011)
[WebDNA] Help me install (WebDNA 7 fastcgi install on Lion 10.7.3) (2012)
headers (2004)
Fwd: Problems with Webcatalog Plug-in (1997)
Still Stumped on ShowNext...HELP! (1997)
Orders Not Processing (fixed) (2003)