public function deletepriceAction()
    {
        $id = $this->_request->getParam('id', 0);
        $modelPrice = new Publisher_Model_DbTable_BookPrices();
        $currentrecord = $modelPrice->CurrentRow($id);
        if ($id > 0 && $modelPrice->isExist($id)) {
            $success = $modelPrice->delete('id=' . $id);
            if ($success) {
                echo "<table width='100%' class='table-list' border='0' cellspacing='0' cellpadding='0'><tr>\n<td width='20%'><div align='left'><strong>Country</strong></div></td>\n<td width='20%'><div align='left'><strong>Language</strong></div></td>\n<td width='10%'><div align='left'><strong>Price</strong></div></td>\n<td width='20%'><div align='left'><strong>Group Price</strong></div></td>\n<td width='10%'><div align='left'><strong>Action</strong></div></td>\n</tr>";
                $modelPrice = new Publisher_Model_DbTable_BookPrices();
                $priceList = $modelPrice->getPriceList($currentrecord['product_id']);
                for ($jj = 0; $jj < count($priceList); $jj++) {
                    $deletePriceUrl = $this->view->url(array('module' => 'publisher', 'controller' => 'book', 'action' => 'deleteprice', 'id' => $priceList[$jj]['id']), '', true);
                    echo "<tr><td><div align='left'>";
                    $modelCountry = new Publisher_Model_DbTable_Books();
                    $countryRecord = $modelCountry->getCountryName($priceList[$jj]['country_id']);
                    echo $countryRecord['country'];
                    echo "</div></td><td><div align='left'>";
                    $modelLanguage = new Publisher_Model_DbTable_Books();
                    $languageRecord = $modelLanguage->getLanguageName($priceList[$jj]['language_id']);
                    echo $languageRecord['language_name'];
                    echo "</div></td><td><div align='left'>";
                    echo "\$" . $priceList[$jj]['price'];
                    echo "</div></td><td><div align='left'>";
                    echo "\$" . $priceList[$jj]['group_price'];
                    echo "</div></td><td><div align='left'>";
                    echo "<a class='action-icon' href='" . $deletePriceUrl . "' onclick='return deleteprice(this.href);' title='Delete'>";
                    echo "<img src='" . $this->view->serverUrl() . $this->view->baseUrl() . "/public/css/publisher/images/trash.gif' height='10' width='10'>";
                    echo "</a>&nbsp;";
                    ?>
<a href="javascript:void(0);" onclick="return updateprice1('<?php 
                    echo $priceList[$jj]['id'];
                    ?>
','<?php 
                    echo $this->view->serverUrl() . $this->view->baseUrl() . "/publisher/book/saveprice";
                    ?>
','<?php 
                    echo $currentrecord['product_id'];
                    ?>
');"'<?php 
                    echo $priceList[$jj]['id'];
                    ?>
','<?php 
                    echo $this->view->serverUrl() . $this->view->baseUrl() . "/publisher/book/saveprice";
                    ?>
','<?php 
                    echo $formData['id'];
                    ?>
');">
<img src="<?php 
                    echo $this->view->serverUrl() . $this->view->baseUrl() . "/public/css/publisher/images/icon_edit.png";
                    ?>
" width="10" height="10"/>
</a>
<?php 
                    echo "</div></td></tr>";
                }
                echo "</table>";
                exit;
            } else {
                echo "<font color='red'><strong>Sorry!, unable to delete price</strong></font>";
                exit;
            }
        }
    }
 public function deletepriceAction()
 {
     $id = $this->_request->getParam('id', 0);
     $parent_publication_id = $this->_request->getParam('parentid', 0);
     $modelPrice = new Publisher_Model_DbTable_BookPrices();
     $currentrecord = $modelPrice->CurrentRow($id);
     if ($id > 0 && $modelPrice->isExist($id)) {
         $success = $modelPrice->delete('id=' . $id);
         if ($success) {
             echo "<table width='100%' class='table-list' border='0' cellspacing='0' cellpadding='0'><tr>\n<td width='50%'><div align='left'><strong>Country</strong></div></td>\n<td width='30%'><div align='left'><strong>Language</strong></div></td>\n<td width='10%'><div align='left'><strong>Price</strong></div></td>\n<td width='10%'><div align='left'><strong>Action</strong></div></td>\n</tr>";
             $modelPrice = new Publisher_Model_DbTable_BookPrices();
             $priceList = $modelPrice->getPriceList($currentrecord['product_id']);
             for ($jj = 0; $jj < count($priceList); $jj++) {
                 $deletePriceUrl = $this->view->url(array('module' => 'publisher', 'controller' => 'issues', 'action' => 'deleteprice', 'id' => $priceList[$jj]['id'], 'parentid' => $parent_publication_id), '', true);
                 echo "<tr><td><div align='left'>";
                 $modelCountry = new Publisher_Model_DbTable_Books();
                 $countryRecord = $modelCountry->getCountryName($priceList[$jj]['country_id']);
                 echo $countryRecord['country'];
                 echo "</div></td><td><div align='left'>";
                 $modelLanguage = new Publisher_Model_DbTable_Books();
                 $languageRecord = $modelLanguage->getLanguageName($priceList[$jj]['language_id']);
                 echo $languageRecord['language_name'];
                 echo "</div></td><td><div align='left'>";
                 echo $priceList[$jj]['price'];
                 echo "</div></td><td><div align='left'>";
                 echo "<a class='action-icon' href='" . $deletePriceUrl . "' onclick='return deleteprice(this.href);' title='delete'>";
                 echo "<img src='" . $this->view->serverUrl() . $this->view->baseUrl() . "/public/css/publisher/images/trash.gif' height='10' width='10'>";
                 echo "</a>&nbsp;";
                 echo "</div></td></tr>";
             }
             echo "</table>";
             exit;
         } else {
             echo "<font color='red'><strong>Sorry!, unable to delete price</strong></font>";
             exit;
         }
     }
 }