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:

Authenticate Questions (2003) New Site Announcement (1998) DON'T use old cart file! (1997) ACGI processing for .html (1997) Unauthorized User trouble (1998) problems with 2 tags shakur (1997) RE: Renaming textA (1998) RE: Signal Raised (1997) Emailer again (1997) Using Plug-In while running 1.6.1 (1997) View order not right (1997) color and size options (1997) Where is f2? (1997) [taxRate] [TaxTotal] ? (1997) Emailer setup (1997) Carts & cookies (1999) Line items in table cells (1997) WebCatalog2 Feature Feedback (1996) I'm Baaaaaaaaaack - Questions! (2000) RE: Ongoing group search problems ... (1997)