Magento – Create custom tax class based on weight


in germany there is a special Tax on coffee: 2.19 EUR per 1000 gram, and 4.78 EUR per 1000 gram for instant coffee.

I'd like to solve this problem by adding a custom tax to magento.
How would I do that?


I need to calculate the additional product tax based on the product weight instead of the product price.

The product weight may change depending on which (or if any) product options are selected. This is a customer requirement and cannot be changed.

Best Answer

You could modify the existing tax model, but it seems like you are trying to / may have a requirement to display this tax separately. Based on the requirement to display this as part of the totals display, you need to create a custom totals model. Classy Llama have a great series on this rather involved process..

As a summary, you'll need to do the legwork to register your collector and, if you like, use a separate calculation model or just bake yours into your collector. You can grab the products from the address and perform the calculation you need.

Related Topic