PayPal App Delete Log

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

PayPal App Delete Log

Post by mhsuffolk »

In my 1.0.5.0 live shop I can delete the log here.
Capture.JPG
In my test 1.0.8.0 shop there is no delete button.
Capture 2.JPG
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: PayPal App Delete Log

Post by 14Steve14 »

Will be interested in the answer to this as my 1.7.10 has no delete either.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

Re: PayPal App Delete Log

Post by mhsuffolk »

I have compared with the old files, try this.
In includes\apps\paypal\admin\content\log.php Find Line 18

Code: Select all

<h1 class="display-4"><?= $OSCOM_PayPal->getDef('heading_log'); ?></h1>
Add after

Code: Select all

  <tr>
    <td><?php echo $OSCOM_PayPal->drawButton($OSCOM_PayPal->getDef('button_dialog_delete'), '#', 'warning', 'data-button="delLogs"'); ?></td>
    <td style="text-align: right;"><?php echo $log_split->display_links($log_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], 'action=log'); ?></td>
  </tr>
Find.

Code: Select all

  <div class="col text-right mr-2"><?= $log_split->display_links($log_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], 'action=log'); ?></div>
Add after

Code: Select all

<div id="delLogs-dialog-confirm" title="<?php echo tep_output_string_protected($OSCOM_PayPal->getDef('dialog_delete_title')); ?>">
  <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><?php echo $OSCOM_PayPal->getDef('dialog_delete_body'); ?></p>
After the last </div> of the file add

Code: Select all

<script>
$(function() {
  $('#delLogs-dialog-confirm').dialog({
    autoOpen: false,
    resizable: false,
    height: 140,
    modal: true,
    buttons: {
      "<?php echo addslashes($OSCOM_PayPal->getDef('button_delete')); ?>": function() {
        window.location = '<?php echo tep_href_link('paypal.php', 'action=log&subaction=deleteAll'); ?>';
      },
      "<?php echo addslashes($OSCOM_PayPal->getDef('button_cancel')); ?>": function() {
        $( this ).dialog('close');
      }
    }
  });

  $('a[data-button="delLogs"]').click(function(e) {
    e.preventDefault();

    $('#delLogs-dialog-confirm').dialog('open');
  });
});
</script>


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply