Status:
Answered
What is the best way to extend the Tax Module to do a lookup of the local sales tax rate (based on zip code) at the time of the sale? There is a rate lookup URL designed to return the current sales tax rates for an address...
http://dor.wa.gov/Content/FindTaxesAndRates/RetailSalesTax/DestinationBa...
Is this something I can implement into the Tax Module? Any help or a point in the right direction would be appreciated.
Thanks!








Mat,
Rather than trying to modify the Tax module, I suggest you make a new module that will replace the Tax module. It wouldn't be too hard to create. You can use the tax module as a starter. You could call your module wa_tax.module for example.
Then, instead of using the static variable for the tax amount, you would need to query your server and then you can use the result and use that for the tax amount. Take a look at the drupal_http_request function on Drupal.org for a good example of how to speak with your Webservice. There is also an example in the MS Core module function ms_core_get_currency_exchange_rate(). It will probably be a helpful example of how to use the webservice.
Hope that helps!
Sincerely,
Leighton Whiting