Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Delete Logs Rate Topic   - - - - -

 
  • Wop99
  • Advanced Member
  • Members
  • Join Date: 06-Oct 14
  • 127 posts

Posted 24 December 2020 - 04:26 PM #1

Is there a way to see deleted logs?  We might have a person deleting orders and I need to see if I can find a record.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 24 December 2020 - 11:14 PM #2

Deleted logs or deleted orders?  If you are logging orders, you should see order deletion in the log.  Unless of course the admin has access to logs and is deleting an order and then deleting a log.

 

The "clear log" function essentially truncates the cscart_logs table so the data is gone once truncated.


Deleted logs or deleted orders?  If you are logging orders, you should see order deletion in the log.  Unless of course the admin has access to logs and is deleting an order and then deleting a log.

 

The "clear log" function essentially truncates the cscart_logs table so the data is gone once truncated.

 

Suggest you change permissions for your admin users to prevent them from clearing the logs.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21980 posts

Posted 25 December 2020 - 06:28 AM #3

I have just deleted order on the demo. In the default log manager you can see the following

 

https://prnt.sc/w9jz99


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Wop99
  • Advanced Member
  • Members
  • Join Date: 06-Oct 14
  • 127 posts

Posted 28 December 2020 - 08:11 PM #4

Deleted logs or deleted orders?  If you are logging orders, you should see order deletion in the log.  Unless of course the admin has access to logs and is deleting an order and then deleting a log.

 

The "clear log" function essentially truncates the cscart_logs table so the data is gone once truncated.

I am looking for deleted orders?  is there a way to find them.



 
  • Wop99
  • Advanced Member
  • Members
  • Join Date: 06-Oct 14
  • 127 posts

Posted 28 December 2020 - 08:48 PM #5

I am looking for deleted orders?  is there a way to find them.

Is there a way to find who deleted an order?  Is there a log somewhere that does not get deleted?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 28 December 2020 - 08:49 PM #6

No, Deleted means gone!


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21980 posts

Posted 29 December 2020 - 02:07 PM #7

Is there a way to find who deleted an order?  Is there a log somewhere that does not get deleted?

 

Please check post #3 to see how the deleted order will look like


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 29 December 2020 - 11:02 PM #8

But you do need to set it in your logs settings for Orders/deleted.  But note that if you delete (clear) the log, it is gone.  You can 'manage logs' so that it retains a certain number of days with our EZ Admin Helper addon so you can properly "manage logs" to retain a certain amount of history without the log table getting out of control.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Wop99
  • Advanced Member
  • Members
  • Join Date: 06-Oct 14
  • 127 posts

Posted 05 January 2021 - 06:09 PM #9

Are there any Add-Ons that can record actions done in Admin secretly so I can see who is deleting logs?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12071 posts

Posted 05 January 2021 - 07:30 PM #10

If it's specific to "log clear", you could create a file named app/addons/my_changes/backend/logs.pre.php

And in it have content similar to:

<?php
if( !defined('BOOTSTRAP') ) die('Access denied');
use Tygh\Registry;
 
if( $_SERVER['REQUEST_METHOD'] == 'POST' && $mode == 'clear' ) {
  $email = db_get_field("SELECT email FROM ?:users WHERE user_id=?i", $_SESSION['auth']['user_id']);
  $msg = sprintf("[%s]: %s cleared logs.\n",  date("m/d/Y H:i:s", TIME), $email);
  @file_put_contents("./clear_log.log", $msg, FILE_APPEND);
}
return array(CONTROLLER_STATUS_OK);

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.