Jump to content
thirty bees forum

Different tax rules for combinations, possible ?


Recommended Posts

Hi, this is a very specific case.

For my store, I am selling books. They come in 3 possible combinations: paper, epub, pdf.

However, the way combinations work, the tax rule is applied to the whole product (which would normally make sense but not in my case). For books, I need different tax rules for paper and ebooks.

In Canada, books are only taxed at the federal level which is the GST (5%). But this does not apply to ebooks which are considered standard products and should be taxed both at the federal and provincial level. GST + QST for Quebec and so on.. So a paper book would have a 5% tax but a pdf of the same book would have a 15% tax (rounded for my example).

Creating the rule is not the problem as it is working fine, but applying different rules to different combination of a product is.

I was going to overwrite this like I've did with the shipping option of the checkout (which is causing the same exact issue since the paper has to be delivered and the ebooks downloaded) but taxes are spread all over the place and I can't think of an easy way to do it.

Any modules already doing this ? Anyone has a suggestion ? My only other way to do that is to use different products for paper and ebooks but this does not look sexy..

Thanks for your thoughts. Sylvain

Link to comment
Share on other sites

@lesley Looks like I have some work to do then :thinking:

I'll come up with something but it won't be pretty and unique to my shop most likely.

I wish I could avoid that.. maybe I should put pressure on the government to change their tax rules on books instead :pray_tone1:

Link to comment
Share on other sites

@marci123 said in Different tax rules for combinations, possible ?:

Maybe a product bundle could be a solution where the buyer can choose to buy one or the other?

That's an idea but it will still require the creation of 3 different products. I already found a way to do it that way without bundles and make it look like a combinaison but I would like to avoid having different products when theorically, it is the same book 'content' while the format is the only difference.

Link to comment
Share on other sites

If anyone is interested by this, I did solve my problem by adding a product attribute id parameter to the public static function getIdTaxRulesGroupByIdProduct() in the Product class and worked my magic in there. Not really a general fix but it is working for me and I can give you more details if you're ever looking to do the same (which I doubt since I may be the only one having this particular issue).

Of course had to adapt the following classes/controller that were calling it as well:

  • override/controllers/front/ParentOrderController.php (Added)
  • override/classes/tax/Tax.php (Added)
  • override/classes/order/OrderSlip.php (Added)
  • override/classes/order/OrderDetail.php (Added)
  • override/classes/Product.php (Modified)
  • override/classes/Cart.php (Modified)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...