Create a custom tax picker

The ITaxPicker interface allows you to apply custom logic when the Ecommerce module chooses which tax is going to be applied. To do this, you must perform the following:

  1. Create a class for your custom tax picker.
    Create a class that will represent the tax picker. In this example the name CustomTaxPicker is used.
  2. Implement the ITaxPicker interface.
    The interface requires the FindTax method to be implemented
  3. Implement the FindTax method.
    In this method you can apply custom logic when selecting the tax that is going to be applied. As arguments you receive the shipping address of the cart. If there is no shipping address defined, you the argument will be the billing address.
    Use the following code sample:
  4. Register the custom tax picker.
    In the Global.asax file, register the custom tax picker in the following way:

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?