Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a default tax address preference #851

Closed
wants to merge 0 commits into from
Closed

Add a default tax address preference #851

wants to merge 0 commits into from

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Feb 12, 2016

The current default_tax_zone system is flawed: It conflates tax and
shipping zones (Spree::Order#tax_zone can return a shipping zone if that
happens to be smaller than the smalles matching tax zone), and it creates
a large number of complex queries that won't be necessary once we start
finding tax rates by the order's tax address.

However, the default tax zone was good for one thing: Tell the system which
taxes to use for orders in cart state (before any addresses are entered).

This commit introduces a default tax address preference, defaulting to an
address with the default country as country. The object is also frozen so
the taxation system doesn't go on building many useless objects.

This PR should also ease @jhawthorns concerns about using the same preference for the default country being used for taxation purposes: If you want to override it, specify a different default tax address.

@mamhoff mamhoff closed this Feb 13, 2016
@mamhoff
Copy link
Contributor Author

mamhoff commented Feb 13, 2016

Superseded by #862

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant