Commerce Canadian Taxes

Commerce Canadian Taxes builds on the Drupal Commerce's Commerce Tax module for Canadian retail sales taxes. It deals with simple retail sales taxes and can be extended to support less common ones in Canadian tax jurisdictions.
Retail sales tax coverage is not complete, but will cover most situations. For example, the Ontario tax rule that exempts the provincial tax component for sales of food under $4 has not been implemented.
The following retail sales taxes are supported:

Provincial Taxes

  • NL: HST, RST(vehicles)
  • NS: HST
  • PE: HST
  • QC: GST, QST
  • ON: HST, GST
  • AB: GST
  • BC: GST, PST
  • YT: GST
  • NT: GST
  • NU: GST
  • GST = Goods and Services Tax
  • HST = Harmonized Sales Tax
  • LCT = Liquor Consumption Tax
  • PST = Provincial Sales Tax
  • PVT = Provincial Vehicle Tax
  • QST = Quebec Sales Tax
  • RST = Retail Sales Tax
  • TPPT = Tangible Personal Property Tax


  • Fields are created for each tax and grouped under each jurisdiction
  • A single field collection is added to each Commerce Product bundle and Commerce Shipping line item
  • Commerce Tax rates are defined for each tax in each jurisdiction
  • Taxes are configurable for each jurisdiction on a product level
  • Rules are used to calculate taxes on cart line items
  • A separate UI module is provided to initialize the tax field instances

Current Limitations

Default shipping tax settings: The exclusion of PST for MB, SK, and BC is handled in code for the time being.
Currently, there is one set of global defaults for all taxable things. However, line items are created transparently, meaning they don't exist until they're created for the cart. So, there is no easy user-configurable way to control what taxes are applicable on shipping without also affecting the default settings for products.
One approach would be to create a different set of defaults for each taxable entity.
Too bad shipping was not implemented as a product...

Relationship to other modules

Commerce Canadian Taxes supports applying taxes to Commerce Line Items, including Commerce Shipping Line Items. The same tax field can be added to Shipping Line Items via the Commerce Canadian Taxes UI module.

Upgrading from Commerce Canadian Taxes 7.x-1.x

Uninstall Commerce Canadian Taxes 7.x-1.x

  1. Back up your installation. (Backing up a site -
  2. Put your site in maintenance mode (Note #4 -
  3. Disable 'Commerce Canadian Taxes'.
  4. Uninstall 'Commerce Canadian Taxes'.
  5. Delete the 'commerce_canadian_taxes folder'.
  6. Flush all caches, then take your site out of maintenance mode.
  7. If the tax rules from v7.x-1.x are not deleted following step #6, manually delete the following tax rules:
    'HST BC'
    'HST New Brunswick'
    'HST NL'
    'HST NS'
    'HST ON'
    'PST Manitoba'
    'PST PE'
    'PST SK'
    'PST Quebec (QST/TVQ)'


  1. Download and install the Commerce Canadian Taxes module, which includes the Commerce Canadian Taxes UI module.
  2. Go to "Modules" (admin/modules) and enable both modules.
    A field named 'Canadian Sales Taxes' (field_sales_taxes_ca) is automatically added to all Commerce Product types and Shipping Line Item (if installed) with default settings for applicable taxes.
  3. At this point, the tax fields are created but existing host instances are not yet initialized. In this case, the host instances are the various commerce_product bundles. This is normal when fields are added after entities are created. Normally, you would use Views Bulk Operations (VBO) to initialize your products. However, initialization of Field Collections does not work with VBO.
    The Commerce Canadian Taxes UI module will initialize all product instances in user-configurable batch sizes. This process takes considerable time, proportionate with the number of items you're initializing. Depending on the performance of your server, large batch sizes (> 25 products per batch) may time-out.
    Alternatively, you can load and save each existing product one-by-one using the Commerce Product UI.
  4. Change the applicable tax settings for each product, as necessary

Module Dependencies:

  • Commerce Line Item
  • Commerce Order
  • Commerce Tax
  • Commerce Tax UI
  • Entity
  • Field
  • Field Collection
  • List
  • Options
  • Rules


Default applicable tax settings are configured using the Field Collections UI.
To edit the default tax field settings, click "manage fields" for each Administrative Area (province), and edit the default value of each tax field (boolean).
"Structure > Field collections"
Applicable taxes can be set for each product for each product using the Commerce Product UI.
Simply open the product and update the tax settings under "Canadian Sales Taxes".
"Store > Products"
Tax rates are configured using Commerce Tax Rate UI:
"Store > Configuration > Taxes"
Rules are configured using the Rules UI:
"Configuration > Workflow > Rules > Components"

Integration with other commerce modules

Commerce Canadian Taxes 7.x-2.x integrates with Commerce Shipping (7.x-2.0) but needs to be configured to function properly.

  1. Change the Apply sales tax to shipping rule to use the new Canadian sales taxes.
    1. Navigate to rules configuration (Configuration > Workflow > Rules)
    2. Edit rule 'Apply sales tax to shipping'
    3. Edit action 'Calculate taxes for a line item'
    4. Change 'Tax type'
      From:Sales tax
      To:Canadian sales taxes
    5. Save the rule.
  2. Add the existing field 'Canadian Sales Taxes' (field_sales_taxes_ca) to the shipping line item.
    1. Navigate to the Shipping Line Item fields
      (Store > Configuration > Line Item Types > Shipping > Manage fields).
    2. Click on '-Select an existing field-'.
    3. Choose 'Canadian Sales Taxes' (or 'Field collection: field_sales_taxes_ca
      (Canadian Sales Taxes)' as it appears in the select.
    4. Change the 'Widget Type' from 'Embedded' to 'Hidden' (optional).
    5. Save the Shipping line item fields.

Note: Commerce Canadian Taxes integrates with Commerce Shipping using hook hook_commerce_shipping_line_item_new_alter to initialize the line item's tax field.
If you need to charge taxes on other line item types you will need to implement the equivalent hook, if it exists.

Related issues

  1. Issue related to the latest release of Internationalization
    Need to patch to get Boolean field labels to show instead of "On Value"
  2. Can't update Field Collections with Views Bulk Operations (VBO)

Changes from version 1.x

Version 2.x is a complete re-write of the initial module. Additional tax rates have been added and are current as at 1 July 2013.
Note that you cannot upgrade from version 1.x to 2.x.


Version 1.x is no longer supported.
Version 2.x sponsored by: Esper Consulting Inc., Ottawa, Canada