1

I have followed instructions (http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-tax-config-ca) to create Canada GST, HST (ON, NB, NF, & NS), then tried to create tax rules.

Whenever creating GST (HST) rule, or BC-PST rule, I received the following error even though definitely there is NO tax rule exists.

"Rules () already exist for the specified Tax Rate, Customer Tax Class and Product Tax Class combinations"

I really appreciate if anyone can help.

4

The existing answers regarding orphaned entries in the tax_calculation table are absolutely right. But there is missing practical information how to get rid of them.

You can show the orphaned entries with the following MySQL query:

SELECT * FROM `tax_calculation` WHERE `tax_calculation_rule_id` NOT IN (SELECT `tax_calculation_rule_id` FROM `tax_calculation_rule`);

You can then delete them with:

DELETE FROM `tax_calculation` WHERE `tax_calculation_rule_id` NOT IN (SELECT `tax_calculation_rule_id` FROM `tax_calculation_rule`);
3

The problem is caused when a rule is removed. The rule is then removed from the tax_calculation_rule table, but not from the tax_calculation table, where the actual rule, product and customer classes are combined.

If you then want to create a rule that combines the same classes, you will get this error.

To solve the problem the only way I have come up with is editing the database directly. Either remove the offending row from tax_calculation, or adding the rule to the tax_calculation_rule table. Best is probably a combination of both.

BE carefull!

2

I ended up editing database following is the process

  1. go to your database and browse table tax_calculation
  2. if you do not have any rule defined or you deleted all rules and still you are getting this error then truncate this table
  3. if you have rules predefined then check the product_tax_class_id, customer_tax_class_id, tax_calculation_rate_id combination and delete the row

Note : do not follow these steps if you do not know anything about MYSQL database and tables

1

I got this too when I tried changing the name of an existing Tax Rule.

Not really sure what the error message means but I got around it by just deleting the Tax Rule and creating a new one, this way I was able to name it whatever I wanted.

1
  • I have no rules at all but I keep having this message :-( – lrkwz Oct 9 '14 at 20:52
1

I was able to clear this error by going into your PHPMYADMIN and truncating tables, tax_calculation, Tax_rules, Tax_rate. For some reason, when you delete them on Magento's admin, it's not communicating with the database, so all the rules, and rates are still on the database. You have to clear them on there manually anytime you want to delete.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.