In Drupal 7 it was easy to create new tax configurations using rules. Now in Drupal 8, it is a little bit more complicated but even more flexible. At the moment there isn't a GUI to configure taxes past setting up a simple Sales or VAT per location. That is where Drupal 8 commerce tax resolvers come in.
Drupal Commerce's tax resolvers make it easy for setting up custom tax rules based upon your criteria. Recently I set up two new types of tax resolvers. The new tax resolvers allow for a user to be tax-exempt and also taxed based upon the cost of each line item.
Tax-Exempt
The tax-exempt tax resolver I implemented basically allows an authenticated user bypass taxes. This was done with a setting up a special type of role and allows the admin to grant tax exemptions to users. Once the role is setup then the tax resolver takes over at checkout.
Line Item Tax
The line item tax resolver was needed to provide a tax on line items after a certain amount threshold was met for that line item. E.g. if a user was purchasing $90 a line item they would not be taxed but if they spent $100 or more then tax would need to be applied to that line item.
Each custom tax resolver is currency independent and can be applied to either sales tax or VAT tax if needed. Both of these are simple implementations and can be expanded upon in the future.
Thanks for reading! Let me know if you have any questions. Please leave a comment below!
Comments