Following a previous question as a simple guide:
Instead of creating a tax rule programmatically, I would like to modify an existing rule, specifically the 'tax_rule' array (which should contain a list of tax rate IDs that are valid for this rule.
These rates can be found by using:
$ruleModel = Mage::getModel('tax/calculation_rule')->load($id); Zend_Debug::dump($ruleModel->getRates());
This should return an array of tax rate IDs that apply to this rule.
$ruleModel->setRates($array)->save() just messes up this rule, removing other values that were previously saved (rule name, priority, etc).
How can I simply load an existing rate model and update the 'tax_rate' field to include an additional tax rate? If the existing array is
array(5,7,9) I would like to update the array to include a new value as well, ie