Re: the dreaded unitShipCost
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 53830
interpreted = N
texte = Andrew Simpson wrote:> and you're right, i have no freakin idea how the formulas database works. i think its probably the most buggy part of the whole of the webcat system. The formulas.db is a very simple lookup/evaluate; there is nothing magical about it. There are a few simple rules that you need to know:1) The formulas.db _only_ fires when you add a lineitem to the shopping cart, and any formula that is evaluated has access to all fields in the current record of the main db (the one that is part of the [addlineitem]). If you change a line in a cart, the formulas will not re-evaluate; you need to do that yourself. The best way to do this is to make the formula an [include] file and the use it both in the formulas.db as well as in any templates where you need to recalculate the value.2) The formulas.db that is used is the one in the same directory as the template containing the [addlineitem] itself.I'll bet that when you are adding lines via the form, you are in one directory, but when you are trying to re-add the lines, you are in a completely different directory (one without a proper formulas.db). If I remember correctly, this was for returning customers; you should redirect to a ReloadCart.tmpl page in the same directory as the original [addlineitems] was (rather than duplicating your formulas.db all over your drive).John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Andrew Simpson wrote:> and you're right, i have no freakin idea how the formulas database works. i think its probably the most buggy part of the whole of the webcat system. The formulas.db is a very simple lookup/evaluate; there is nothing magical about it. There are a few simple rules that you need to know:1) The formulas.db _only_ fires when you add a lineitem to the shopping cart, and any formula that is evaluated has access to all fields in the current record of the main db (the one that is part of the [addlineitem]). If you change a line in a cart, the formulas will not re-evaluate; you need to do that yourself. The best way to do this is to make the formula an [include] file and the use it both in the formulas.db as well as in any templates where you need to recalculate the value.2) The formulas.db that is used is the one in the same directory as the template containing the [addlineitem] itself.I'll bet that when you are adding lines via the form, you are in one directory, but when you are trying to re-add the lines, you are in a completely different directory (one without a proper formulas.db). If I remember correctly, this was for returning customers; you should redirect to a ReloadCart.tmpl page in the same directory as the original [addlineitems] was (rather than duplicating your formulas.db all over your drive).John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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://webdna.smithmicro.com/
John Peacock
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:
Hyperboard/bulletin board available (1998)
WebCat and PIXO (2000)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
Cookie Newbie (2002)
Date range (2006)
webcat error log (1998)
[WriteFile] problems (1997)
Stumpted Again (1997)
Can't load tmpl files (1997)
[WebDNA] hideif within a search (2009)
HTML (1999)
an easy one... (2000)
shownext & math (1997)
Unexpected error (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Quick poll (2003)
[WebDNA] uploading videos (2018)
WebCat2b12plugin - [search] is broken ... not! (1997)
WebCat2_Mac RETURNs in .db (1997)
math on date? (1997)