*/ class Mage_Tax_Model_Resource_Sales_Order_Tax_Item extends Mage_Core_Model_Resource_Db_Abstract { /** * Resource initialization */ protected function _construct() { $this->_init('tax/sales_order_tax_item', 'tax_item_id'); } /** * Get Tax Items with order tax information * * @param int $item_id * @return array */ public function getTaxItemsByItemId($item_id) { $adapter = $this->_getReadAdapter(); $select = $adapter->select() ->from(array('item' => $this->getTable('tax/sales_order_tax_item')), array('tax_id', 'tax_percent')) ->join( array('tax' => $this->getTable('tax/sales_order_tax')), 'item.tax_id = tax.tax_id', array('title', 'percent', 'base_amount') ) ->where('item_id = ?', $item_id); return $adapter->fetchAll($select); } }