WC2b12: Yes, Formulas.db is for real

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10396
interpreted = N
texte = >There's actually no formulas.db file, Grant was referring to writing your >own formulas using the built-in [math] functions of WebCat2.0.Sorry, Ken, but there REALLY IS a Formulas.db database that has a very special purpose. Look in your GeneralStore folder and you'll see it there.There is a very special case that goes on 'under the hood' whenever you $Add, $ShowCart, or $Purchase: WebCatalog2 looks for a file called Formulas.db in the same folder as the template, and if it finds a formula that overrides price, unitShipCost, taxRate, or shipCost, then that formula will be used instead of the normal meaning of those 4 variables. This gives you the ability to change prices for different circumstances without allowing visitors to 'hack' prices by typing them in themselves. For instance, you could create a discount for people who have a certain username/password. ClubMac does this for their corporate customers.You can have a different Formulas.db for each of your stores, because WebCatalog always looks in the local folder, so GeneralStore has its own formulas.db and YourStore has separate formulas.db.If you don't have a formula defined for one of the 4 variables listed above, then WebCatalog looks for the corresponding price field in the database that matches the SKU of the product being added (this is how it always worked from WebCat1.0 and up). Same for unitShipCost. taxRate works similarly, but it applies globally to the entire order, not just the one product being added. Same for shipCost.Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: WC2b12: Yes, Formulas.db is for real (Kenneth Grome 1997)
  2. WC2b12: Yes, Formulas.db is for real (Grant Hulbert 1997)
>There's actually no formulas.db file, Grant was referring to writing your >own formulas using the built-in [math] functions of WebCat2.0.Sorry, Ken, but there REALLY IS a formulas.db database that has a very special purpose. Look in your GeneralStore folder and you'll see it there.There is a very special case that goes on 'under the hood' whenever you $Add, $ShowCart, or $Purchase: WebCatalog2 looks for a file called formulas.db in the same folder as the template, and if it finds a formula that overrides price, unitShipCost, taxRate, or shipCost, then that formula will be used instead of the normal meaning of those 4 variables. This gives you the ability to change prices for different circumstances without allowing visitors to 'hack' prices by typing them in themselves. For instance, you could create a discount for people who have a certain username/password. ClubMac does this for their corporate customers.You can have a different formulas.db for each of your stores, because WebCatalog always looks in the local folder, so GeneralStore has its own formulas.db and YourStore has separate formulas.db.If you don't have a formula defined for one of the 4 variables listed above, then WebCatalog looks for the corresponding price field in the database that matches the SKU of the product being added (this is how it always worked from WebCat1.0 and up). Same for unitShipCost. taxRate works similarly, but it applies globally to the entire order, not just the one product being added. Same for shipCost.Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Grant Hulbert

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:

(2000) Speaking of... (1999) problems with 2 tags shakur (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Sitebuilder (2004) Free Code Snippet: DHTL News Ticker for WebDNA (2003) URGENT: NO BUG, woFIELDdata & FIELDword=ww (2002) Template cache problem with WC4 on Mac OS X (2000) [WebDNA] Sendmail problem (2009) Bad Cookie / Internet Option / Internet Explorer (2004) (1999) More on the email templates (1997) XML - USPS Lookups - UPS Lookups (2003) Bug? (1997) Accented chars and emailer (1998) unable to launch acgi in WebCat (1997) [lineitems] (2000) Email (1998) NetSplat and WebCat2 (1997) TCPConnect strange behaviour (2004)