copona / copona

A free shopping cart system, based on OpenCart (http://www.opencart.com). An ideal alternative to Opencart, rich to develop - easy to use! Read Wiki for improvements over Opencart.
GNU General Public License v3.0
67 stars 32 forks source link

More transparent Tax calculation #127

Open arnisjuraga opened 7 years ago

arnisjuraga commented 7 years ago

I have struggled with this with every OC project :(

Cross your fingers and wait/guess - which prices will be visible by Customers!

So, if I want to add the Tax for Every Customer wherever it comes from, I need to create "All countries" Geo Zone, manually add all countries to that zone (~250..., or use a simple javascript module to do this automatically) and then add tax to that Geo Zone. Then I can be "almost" sure - all customers will see prices with Tax.

Otherwise - if a customer doesn't fall in any geo zone, then there is no way I can be sure - what prices will be shown to Customer: with or without tax? At the end - Customer can always "fake" his Geo Location, and then will be able to receive prices without tax even though, he is not located in Tax-Free zone.

Also, there is too many rules to set up, to have Taxes work correctly:

This could be a major change. For EU customers, it's easy to me just set one tax, one rule for all around the world.

Or another approach - make it simple to define a global rule for the shop - one tax or one class for everyone. But fro specific tax settings users can use fully functional graduated settings.

Also, if you are editing Order from Backend - then there is "no-way" you can be sure, which taxes will be added as it seems it uses admin-user session.

Here are some ideas and discussions on this: https://github.com/opencart/opencart/issues/3508 https://github.com/opencart/opencart/issues/2999 https://github.com/opencart/opencart/issues/4887

ADDCreative commented 7 years ago

I usually have to set the following taxes. To all UK customers - 20% To EU consumer customers - 20% To EU VAT registered business customers - None (using a different customer group) To all of the rest of the world - None

I don't think I've ever set one tax for all of the world. Is it not the case that most EU countries 0% rate if exporting outside the EU?

It's difficult to know how to make it easier to set up without losing functionality. You would still need different taxes for different zones, customer groups, products, address location.

If you did want to make it easier to set a at for all of the world. You could add an All Zones (value=0) to the Geo Zone drop down of the Tax Rates editor. Like the payment and shipping modules have.

I'm guessing the tax queries will need changing from.

AND (z2gz.country_id = '" . (int)$country_id . "' AND (z2gz.zone_id = '0' OR z2gz.zone_id = '" . (int)$zone_id . "')

To something like.

AND (tr2.geo_zone_id = '0' OR (z2gz.country_id = '" . (int)$country_id . "' AND (z2gz.zone_id = '0' OR z2gz.zone_id = '" . (int)$zone_id . "'))
arnisjuraga commented 7 years ago

Two fresh problems:

what about, if we set priority to products WITH tax - and display prices without tax then and only, if we have set up such exception for some countries or Geo Zones?