public function render(Varien_Object $row) { $shippingmethodHistoryId = $row->getShippingMethodHistoryId(); $resource = Mage::getSingleton('core/resource'); $readConnection = $resource->getConnection('core_read'); $sql = 'SELECT distinct(`field_name`) from ' . $resource->getTableName("erp_inventory_shipping_method_history_content") . ' WHERE (shipping_method_history_id = ' . $shippingmethodHistoryId . ')'; $results = $readConnection->fetchAll($sql); $content = ''; foreach ($results as $result) { $content .= $result['field_name'] . '<br />'; } return $content; }
public function render(Varien_Object $row) { $shippingMethodHistoryId = $row->getShippingMethodHistoryId(); // $url = $this->getUrl('adminhtml/inpu_shippingmethods/showhistory'); return '<p style="text-align:center"><a name="url" href="javascript:void(0)" onclick="showhistory(' . $shippingMethodHistoryId . ')">' . Mage::helper('inventorypurchasing')->__('View') . '</a></p> '; // <script type="text/javascript"> // function showhistory(shippingMethodHistoryId){ // var shippingMethodHistoryId = shippingMethodHistoryId; // var url = "'.$url.'shippingMethodHistoryId/"+shippingMethodHistoryId; // TINY.box.show(url,1, 800, 400, 1); // } // </script> }