Jump to content

RockCommerce tax rates handling


gebeer
 Share

Recommended Posts

Hi @bernhard,

I'm just getting started with setting up my first project using your RockCommerce module.

Installation on a new site went fine. Also basic product setup.

But now I'm stuck on setting up and applying tax rates. I figured out that I can add child pages 
image.png.25417ea38fcf10c84c7a55a4c1d2aea8.png

And I can set a default tax rate on the "Taxrates" page.

But how are non-default rates handled per product? Do I use the field rockcommerce_defaulttaxrate on my product template?

When I add the field rockcommerce_vat  to my product template, I get a non-editable field

image.png.f9ebaf95657418691db20137ab4840e5.png

When I add rockcommerce_taxrate, I get an input for the tax rate
 image.png.0f075e777b3c7b3b5d848b337e103c9e.png

When I enter a value here, will this be picked up automatically for the price calculations?
And I think it would be better to have a page select field where we can choose from the tax rates that we added as children of the "Taxrates" page.

Is this the correct way to set this up?

Unfortunately I couldn't find anything in the docs. Would be much appreciated if you added a section about tax handling there. The quickstart docs are great, but I think tax handling is a very essential thing in every shop. So this should definitely be covered by the docs.

EDIT (1h later): I just realized that in the readme.md inside the docs-old/taxes folder of the module there is a section about taxes that answers some of my questions. I was relying on the documentation at https://www.baumrock.com/en/processwire/modules/rockcommerce/docs/ The information in the readme.md is not contained there and I am not sure if it still applies since it is in the docs-old folder? Imo it would be great to have everything in one place.

Link to comment
Share on other sites

To expand on this, imo these are the minimum points that should be covered by the docs:

  • defining tax rates
  • setting default tax rate
  • apply tax rate different from default to product
  • explain how prices are calculated:

- does RC always calculate with default rate if no other rate is set for a product?

- do we need to implement those calculations ourselves?

If you can add those, that would be awesome. Thank you.  

Link to comment
Share on other sites

Hi @gebeer thank you for your questions.

5 hours ago, gebeer said:

But how are non-default rates handled per product? Do I use the field rockcommerce_defaulttaxrate on my product template?

This is at the moment not possible. RockCommerce by default can only handle a global taxrate per user (to be more precise per cart), not per product.

5 hours ago, gebeer said:

Unfortunately I couldn't find anything in the docs. Would be much appreciated if you added a section about tax handling there. The quickstart docs are great, but I think tax handling is a very essential thing in every shop. So this should definitely be covered by the docs.

EDIT (1h later): I just realized that in the readme.md inside the docs-old/taxes folder of the module there is a section about taxes that answers some of my questions. I was relying on the documentation at https://www.baumrock.com/en/processwire/modules/rockcommerce/docs/ The information in the readme.md is not contained there and I am not sure if it still applies since it is in the docs-old folder? Imo it would be great to have everything in one place.

Absolutely. Unfortunately I had to do quite a lot of refactoring before I launched and therefore some of the docs were outdated, so I decided to keep them as backup in the docs-old folder and move them over to the new folder as I find time to correct outdated informations. I have done that now for tax handling and things are clear now hopefully.

5 hours ago, gebeer said:
  • defining tax rates
  • setting default tax rate

Thx! That's added!

5 hours ago, gebeer said:

explain how prices are calculated:

That's already in the docs about the cart. I have added a note to the tax docs as well, thx.

5 hours ago, gebeer said:
  • apply tax rate different from default to product
  • explain how prices are calculated:

- does RC always calculate with default rate if no other rate is set for a product?

- do we need to implement those calculations ourselves?

If you can add those, that would be awesome. Thank you.  

As you can see in the old docs I thought about adding that, but I decided against it. The goal was to make the experience of setting up a simple shop as simple as possible. Obviously that comes with some limitations.

I think it would not be too hard to add support for different taxrates per product. But it would also not be trivial. Different taxrates per product means the VAT of the cart is not anymore a simple "net times taxrate" calculation. It moves that calculation to each product and then the cart needs to collect all taxes and then maybe even list them on the cart summary like so:

items net: 120,00€
items vat: 21,00€
- 10% of 50€ = 5€
- 20% of 50€ = 10€
- 30% of 20€ = 6€

The goal is to keep RockCommerce as simple as possible by default. Similar to product variations that have to be enabled manually we could also add an option to allow taxes on a product level rather than on a cart level.

If you have that need (or anybody else) let's get in touch via PM!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you so much for the quick reply @bernhard and for adding stuff to the docs so quickly!

Now the docs are coming together very nicely. I really appreciate that.

54 minutes ago, bernhard said:

As you can see in the old docs I thought about adding that, but I decided against it. The goal was to make the experience of setting up a simple shop as simple as possible. Obviously that comes with some limitations.

I think it would not be too hard to add support for different taxrates per product. But it would also not be trivial. Different taxrates per product means the VAT of the cart is not anymore a simple "net times taxrate" calculation.

That is totally fine. If we know these limitations as developers, we can maybe implement custom solutions if the existing cart hooks are sufficient and allow us to do those calculations and display them in the cart.

I have a rather simple shop atm with single tax rate. Just wanted to know how to handle things when tax rates are needed per product. My experence with other shops shows that this will eventually come up at some point in time :-)  

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...