public function tax_calculation_rate() { $items = Mage::getModel('tax/calculation_rate')->getCollection()->getItems(); foreach ($items as $item) { $item->delete(); } $this->conn->query('ALTER TABLE `tax_calculation_rate` AUTO_INCREMENT=1'); foreach ($this->objects['tax_calculation_rate'] as $item) { $model = new Mage_Tax_Model_Calculation_Rate(); foreach ($item as $key => $value) { $model->setData($key, $value); } try { $model->save(); } catch (Exception $e) { mage::d($e->getMessage()); } } }