This topic is for support of the Optimize tep_get_tax_rate() contribution.
Each time a price is displayed on osCommerce the tax rate for that product is queried. Even if the user has set to not display taxes with price the tax rate is queried.
Query for each rate one time as it is needed and then store it in session cache.
What this contribution does:
This code change will modify the tep_get_tax_rate() method so the first time a tax rate is requested it stores it in session. On every tax rate query it is first checked to verify if it's already in sesssion and if not will query / store in cache. If it is already in session it will return that value and save the database lookup.
Reduction in per page query count and faster execution times. Query reduction has been demonstrated to be around 75% savings on some pages.
8 setups with differing server configurations and osC setup. This change should not affect any other contributions.
As fast as you can open a file, make one change, and upload.
Support for this contribution is here: http://forums.oscommerce.com/index.php?showtopic=110585