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 Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 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:

    
  1. Re: the dreaded unitShipCost ( Stuart Tremain 2003)
  2. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  3. Re: the dreaded unitShipCost ( Stuart Tremain 2003)
  4. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  5. Re: the dreaded unitShipCost ( Stuart Tremain 2003)
  6. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  7. Re: the dreaded unitShipCost ( Stuart Tremain 2003)
  8. Re: the dreaded unitShipCost ( John Peacock 2003)
  9. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  10. Re: the dreaded unitShipCost ( Alain Russell 2003)
  11. Re: the dreaded unitShipCost ( Alain Russell 2003)
  12. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  13. Re: the dreaded unitShipCost ( John Peacock 2003)
  14. Re: the dreaded unitShipCost ( "Andrew Simpson" 2003)
  15. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  16. Re: the dreaded unitShipCost ( "Andrew Simpson" 2003)
  17. Re: the dreaded unitShipCost ( Donovan Brooke 2003)
  18. Re: the dreaded unitShipCost ( "Andrew Simpson" 2003)
  19. Re: the dreaded unitShipCost ( "Andrew Simpson" 2003)
  20. Re: the dreaded unitShipCost ( Tim Robinson 2003)
  21. Re: the dreaded unitShipCost ( "Andrew Simpson" 2003)
  22. Re: the dreaded unitShipCost ( Stuart Tremain 2003)
  23. the dreaded unitShipCost ( "Andrew Simpson" 2003)
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 Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 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)