Modifying taxes

To modify a tax, you must perform the following:

  1. Get an instance of the orders manager.
    Get an instance of the OrdersManager object.
  2. Get the specified tax.
    Get an instance of the tax. For more information, read Querying taxes.
  3. Modify the instance of the tax.
    Update the values of the properties of the tax. For more information about modifying the tax class rates, see Setting the tax class rates.
  4. Save the changes.
    Save the changes to the manager.

Here is a code example:

public static void ModifyTax(Guid taxId, AddressType type)
{
    OrdersManager ordersManager = OrdersManager.GetManager();
 
    Tax tax = ordersManager.GetTax(taxId);
 
    tax.AddressType = type;
 
    ordersManager.SaveChanges();
}

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK