Re: Price and Formula.db
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 45509
interpreted = N
texte = I don't plan to understand this whole formulas.db deal, but have youtried using writefile to see the values passed to the formula. I usuallycopy the whole formula to writefile without using the [math] just to seewhat is going on.Art-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On BehalfOf Glenn BusbinSent: Tuesday, November 19, 2002 4:40 PMTo: WebCatalog TalkSubject: Re: Price and Formula.dbI've tried everything I can think of, everything you guys suggested, andeverything I can find in the archives. I have to fall back on thethere's a bug in WC4.x Mac Classic and OS X that prevents Formulas.dbfrom working.Here's the entire Formulas.db:Name FormulaPrice [Math][lookupdb=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]+([lookupdb=Products.db&lookinfield=SKU&value=[URL[SKU][/URL&returnfield=Price]*[lookupdb=Woods.db&lookinfield=Woods&value=[URL][Woods][/URL]&returnfield=ExtraCost])[/Math]Taxable F UNITSHIPCOST 0.00SHIPCOST 0.00TAXRATE 0.00Test 1- This formula will put 0.00 in the Price field of a ShoppingCarttemplate 100% of the time.Test 2- If I change the Price formula to:[Math][lookupdb=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]+10[/Math]it will add 10 to the price from the Products.db 100% of the time.Test 3- If I put[Math=Show]X=[lookupdb=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]+([lookupdb=Products.db&lookinfield=SKU&value=[URL[SKU][/URL&returnfield=Price]*[lookupdb=Woods.db&lookinfield=Woods&value=[URL][Woods][/URL]&returnfield=ExtraCost])[/Math]into a template with the SKU and Woods variables carried from anothertemplate, it will show the correct value for X. Test 4- The lookups will also return the correct values if put into atemplate as two separate lookups.Test 5- If I put the individual lookups into the lineitems loop in theShoppingCart.tpl, it will they both return the correct values.SmithMicro, you created this mess. Although I don't expect you torespond to questions about your products, what do I tell the client andhow do I get the calculated price into a shopping cart based on theprice of the item plus the options? Using a password in the add command is insecure and therefore not anoption.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 toWeb Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------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 don't plan to understand this whole formulas.db deal, but have youtried using writefile to see the values passed to the formula. I usuallycopy the whole formula to writefile without using the [math] just to seewhat is going on.Art-----Original Message-----From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On BehalfOf Glenn BusbinSent: Tuesday, November 19, 2002 4:40 PMTo: WebCatalog TalkSubject: Re: Price and Formula.dbI've tried everything I can think of, everything you guys suggested, andeverything I can find in the archives. I have to fall back on thethere's a bug in WC4.x Mac Classic and OS X that prevents formulas.dbfrom working.Here's the entire formulas.db:Name FormulaPrice [math][lookupdb=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]+([lookupdb=Products.db&lookinfield=SKU&value=[URL[SKU][/URL&returnfield=Price]*[lookupdb=Woods.db&lookinfield=Woods&value=[url][Woods][/URL]&returnfield=ExtraCost])[/Math]Taxable F UNITSHIPCOST 0.00SHIPCOST 0.00TAXRATE 0.00Test 1- This formula will put 0.00 in the Price field of a ShoppingCarttemplate 100% of the time.Test 2- If I change the Price formula to:[math][lookupdb=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]+10[/Math]it will add 10 to the price from the Products.db 100% of the time.Test 3- If I put[Math=Show]X=[lookupdb=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]+([lookupdb=Products.db&lookinfield=SKU&value=[URL[SKU][/URL&returnfield=Price]*[lookupdb=Woods.db&lookinfield=Woods&value=[url][Woods][/URL]&returnfield=ExtraCost])[/Math]into a template with the SKU and Woods variables carried from anothertemplate, it will show the correct value for X. Test 4- The lookups will also return the correct values if put into atemplate as two separate lookups.Test 5- If I put the individual lookups into the lineitems loop in theShoppingCart.tpl, it will they both return the correct values.SmithMicro, you created this mess. Although I don't expect you torespond to questions about your products, what do I tell the client andhow do I get the calculated price into a shopping cart based on theprice of the item plus the options? Using a password in the add command is insecure and therefore not anoption.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 toWeb Archive of this list is at: http://search.smithmicro.com/-------------------------------------------------------------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/
Arturo Vargas
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:
WebCatalog2 Feature Feedback (1996)
Separate SSL Server (1997)
Don't know if this is a silly question... (2003)
Listfiles (1998)
Dark Horse Comics success story (1997)
[isfile] ? (1997)
[TaxableTotal] - not working with AOL and IE (1997)
Running 2 two WebCatalog.acgi's (1996)
Emailer (WebCat2) (1997)
Using Cookie for client specific info? (1997)
Re:Merging databases (1997)
WebCatalog for guestbook ? (1997)
proper username/password *w/out* the authenticate dialog. (2000)
Template Cache problem (2000)
My Eyes doth deceive me (2002)
shipcost (1997)
Nesting format tags (1997)
WebCat b13 CGI -shownext- (1997)
WebCat and WebTV (1997)
RE: Cookies? (1997)