I'm currently working on a Zones.module, ala OSCommerce's concept of Zones. Basically, a Zone is a collection of Geographic locations, weather states or countries. The Zones module will do nothing but provide a basis for Zone-based shipping and Zone-based taxing (both of which I plan to implement after completing the Zones module). For example, say you have a physical presence in Florida. If you bill to anyone in Florida, you need to collect 7% sales tax. You could set up a 'Florida Sales Tax' zone, and then the ZoneTax.module could look up to see if the order is billing to a location in that zone. If so, it would then apply the tax rate to that order.
I'll post my module once I have completed it. Hopefully, this will help someone.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | zones_tax.tar.gz | 3.46 KB | hotgazpacho@hotgazpacho.com |
| #7 | zones.tar_0.gz | 12.19 KB | hotgazpacho@hotgazpacho.com |
| #4 | zones_1.2.tar.gz | 12.04 KB | hotgazpacho |
| #3 | zones.tar.gz | 11.72 KB | hotgazpacho |
Comments
Comment #1
matt westgate commentedWe should probably discuss this more since there are several people working on this at the moment. Care to offer anymore details?
Comment #2
hotgazpacho commentedIts a pretty simple module. By itself, all it does is allow you to group Countries and States into a collection, which I'll call a Zone. It will be up to other modules to decide how to use these Zones.
For example, the Zone Tax module I plan on writing will allow you to select a Zone and apply a Tax formula to it. Then, the module will hook into the price calculation process and apply the formula.
I have a client waiting on this stuff, so I'm going to push through it in the next couple of days.
Comment #3
hotgazpacho commentedOK, I have completed my preliminary work on the zones.module. Looking forward to input...
Comment #4
hotgazpacho commentedUpdated to fix a parse error (should have found that before the intitial upload...).
I am begining work on zones_tax and zones_shipping modules. zones_tax may require a tax API, similar to shippingapi.
Comment #5
Gunny-1 commentedhi hotgazpacho,
Are there updates on zones_tax and zones_shipping modules?
Comment #6
hotgazpacho@hotgazpacho.com commentedI have a working zones_tax module, and am working on a zones_shipping module. I'll post the code here sometime when paying work slows down a bit.
Comment #7
hotgazpacho@hotgazpacho.com commentedZones.module attached
Comment #8
hotgazpacho@hotgazpacho.com commentedZones_Tax.module attached
Comment #9
matt westgate commentedHow does this module compare to the tax module already in HEAD core? The tax.module works by setting up processing rules similar to how email filtering works. You can filtering based on customer's city, state, country and type of product at the moment.
I'd like to get some feedback from those that care about taxes and shipping methods which direction you'd like to see these modules take. Please compare these two approaches if you have time.
Comment #10
hotgazpacho@hotgazpacho.com commentedI have not seen the tax module in HEAD. I can tell you, though, that this set of 3 modules (zones, zones_tax, zones_shipping [still being written]) make for a modular approach. Zones can be applied to anything that needs a group of geographic locations (not just shipping and billing, so it can be used outside ecommerce). That is pretty much the extent of the Zones module.
Zones_tax simply figures out the most specific zone your billing address is in and applies the tax rate apropriate to that zone. Zones_tax only allows you to apply tax rates based on geographic location, so this module will not allow you to apply a specific rate to a specific item. However, I suppose it would not be too much more code to create a table to create (zone, product, taxrate) tuples.
Zones_shipping will behave similarly to zones_tax in that it will figure out the most specific zone that your shipping address is in and claculate the shipping charges. Out of the box, it will support 3 different calculations:
- per_product (a given product in a given zone costs X to ship)
- subtotal (orders costing between MIN and MAX cost X to ship)
- quantity (orders containing between MIN and MAX cost X to ship)
Comment #11
ñull commentedI tried to install the zone module. I found an error in the State listing. First I saw many states double listed. I added DISTINCT to your SQL query. In theory that should have solved it, but then something goes wrong with the paged output. On the 7th and last page I still see "Next page" and "Last page". After that 7th page I see empty pages until page 290.
Another thing I notices is that all foreign characters in the database either have dissappeared or were replaced.
Comment #12
Jean Gionet commentedany updates on this module?
I'd REALLY like to setup my new store/cart using taxes and zones. My store will be in Ontario, Canada so I need to have support for PST (%8) in Ontario only and GST (%7) for the rest of Canada. Everything else outside of Canada won't be charged any taxes. (hmm.. maybe gst on shipping?)
oh and since I'm on day 1 of using drupal.. how exactly do I install/run this? I got the e-com module working following the readme text files. is it basically the same thing for modules of this sort?
thanks
-JG
Comment #13
matt westgate commentedA tax module has been added to the ecommerce package for the upcoming 4.7 release.
Comment #14
rkerr commentedGood news, Matt! I need to launch a new store next month so this is great timing.
Comment #15
solipsist commentedThe Zones module along with the Zones Tax module suffers from #1 the problem with the state listing as reported above and #2 doesn't seem to be any better at calculating tax than the existing Tax module. Is there a more recent ,less buggy, version than the one posted by hotgazpacho?
Comment #16
simeBugger, so much work and I've just redone the lot as ec_regions! What a good name "zones" was too :-P
Comment #17
(not verified) commented