Commerce Tax en Drupal 8 Commerce Tax Resolvers <span property="schema:name" class="field field--name-title field--type-string field--label-hidden">Drupal 8 Commerce Tax Resolvers</span> <span rel="schema:author" class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/u/1" typeof="schema:Person" property="schema:name" datatype="">useradmin</span></span> <span property="schema:dateCreated" content="2019-07-31T10:54:45+00:00" class="field field--name-created field--type-created field--label-hidden">Wed, 07/31/2019 - 05:54</span> <div class="field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img property="schema:image" src="/sites/default/files/2019-07/tax_0.jpg" width="5637" height="3758" alt="Tax" title="Tax" typeof="foaf:Image" /> </div> </div> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div property="schema:text" class="field__item"><p>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.</p> <p>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.</p> <h2><strong>Tax-Exempt</strong></h2> <p>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. </p> <h2><strong>Line Item Tax</strong></h2> <p>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.    </p> <p>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.  </p> <p>Thanks for reading!  Let me know if you have any questions.  Please leave a comment below!</p></div> </div> <section rel="schema:comment" class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=74&amp;2=comment&amp;3=comment" token="k2nAa9zPaZJ1YXSx-274dYF8rYf7l1SyAeJZIsk5bGc"></drupal-render-placeholder> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above clearfix"> <h3 class="field__label">Tags</h3> <ul class="links field__items"> <li property="schema:about" resource="/tag/commerce-tax"><div about="/tag/commerce-tax" typeof="schema:Thing" id="taxonomy-term-23" class="taxonomy-term vocabulary-tags"> <h2><a href="/tag/commerce-tax"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Commerce Tax</div> </a></h2> <span property="schema:name" content="Commerce Tax" class="rdf-meta hidden"></span> <div class="content"> </div> </div> </li> <li property="schema:about" resource="/tag/drupal-8"><div about="/tag/drupal-8" typeof="schema:Thing" id="taxonomy-term-11" class="taxonomy-term vocabulary-tags"> <h2><a href="/tag/drupal-8"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal 8</div> </a></h2> <span property="schema:name" content="Drupal 8" class="rdf-meta hidden"></span> <div class="content"> </div> </div> </li> <li property="schema:about" resource="/tag/drupal-commerce"><div about="/tag/drupal-commerce" typeof="schema:Thing" id="taxonomy-term-4" class="taxonomy-term vocabulary-tags"> <h2><a href="/tag/drupal-commerce"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Commerce</div> </a></h2> <span property="schema:name" content="Drupal Commerce" class="rdf-meta hidden"></span> <div class="content"> </div> </div> </li> <li property="schema:about" resource="/tag/drupal-development"><div about="/tag/drupal-development" typeof="schema:Thing" id="taxonomy-term-3" class="taxonomy-term vocabulary-tags"> <h2><a href="/tag/drupal-development"> <div property="schema:name" class="field field--name-name field--type-string field--label-hidden field__item">Drupal Development</div> </a></h2> <span property="schema:name" content="Drupal Development" class="rdf-meta hidden"></span> <div class="content"> </div> </div> </li> </ul> </div> Wed, 31 Jul 2019 10:54:45 +0000 useradmin 74 at