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 pick options for the product. These radio button options are variables TextA, textb and textc for the shopping cart. They are added fine to the shopping cart (via the $add&db=. . .)and show up as passed variables to the shopping cart page (when I do a [formsvariable]).The formula.db equation works fine when I don't try to add additional prices for product options. It works fine when I make it a formula and add integers to the product price. It doesn't work when I try to do a lookup 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][lookup db=inventory.db&lookInField=sku&value=[sku]&returnField=standardcost]+[lookup db=option3.db&lookInField=optkey3&value=[textC]&returnField=pdelta3][/math]The option3 lookup formula works fine when I put it on the shoppingcart page, outside of the formula.dbI'm afraid it is a catch 22 on the value of textC. The formula is calculated before textC is passed to the next page or stored in the shopping cart. Is this happening? If so, how do I get around it?I have tried doing a [addlineitems] on the shopping cart page instead of the $add on the detail page (allowing easier passing of variables), but couldn't get the [lineitems] to show on the same page. Should this work?Thanks in advance!Sandy Associated Messages, from the most recent to the oldest:

    
  1. RE: formula.db, adding option prices (Marc Eagle 1997)
  2. formula.db, adding option prices (Sandra L. Pitner <76501.3521@CompuServe.COM> 1997)
I have a detail page that has radio buttons for customers to pick options for the product. These radio button options are variables TextA, textb and textc for the shopping cart. They are added fine to the shopping cart (via the $add&db=. . .)and show up as passed variables to the shopping cart page (when I do a [formsvariable]).The formula.db equation works fine when I don't try to add additional prices for product options. It works fine when I make it a formula and add integers to the product price. It doesn't work when I try to do a lookup 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][lookup db=inventory.db&lookInField=sku&value=[sku]&returnField=standardcost]+[lookup db=option3.db&lookInField=optkey3&value=[textC]&returnField=pdelta3][/math]The option3 lookup formula works fine when I put it on the shoppingcart page, outside of the formula.dbI'm afraid it is a catch 22 on the value of textC. The formula is calculated before textC is passed to the next page or stored in the shopping cart. Is this happening? If so, how do I get around it?I have tried doing a [addlineitems] on the shopping cart page instead of the $add on the detail page (allowing easier passing of variables), but couldn't get the [lineitems] to show on the same page. Should this work?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:

Java Path (2004) New WebDNA Solutions ... (1997) no global [username] or [password] displayed ... (1997) WC Database Format (1997) Re[2]: 2nd WebCatalog2 Feature Request (1996) Hiding files/images. (2000) WebCat2: Items xx to xx shown, etc. (1997) About WebCatalog and iTools 7 (2003) [WebDNA] weekday question (2013) Content-type:... (2000) [protect admin] (1997) Latest Version of WebDNA store (2002) IP address & domain name problem (2003) Trouble with formula.db (1997) Huge Problem installing Secure Certs (2006) Next X hits (1996) access denied problem (1997) Post (1997) Unexpected error (1997) Other then credit cards-how? (1997)