mesnitu / EasyPopulate4BookX

Data import and export module for Zencart 1.3.x and 1.5.x
GNU General Public License v2.0
1 stars 0 forks source link

Database changes are not logged #15

Open mc12345678 opened 8 years ago

mc12345678 commented 8 years ago

As part of PCI compliance, Zen Cart has added a function to be used when the database is modified on the administration side. EP4 provides a backwards compatible file for older versions of ZC as developed by lat9, and when the base EP4 program makes database changes a logging action is performed.

It is suggested that this EP4 "add-on" also perform this action whenever an item is added, deleted or modified.

A sample of code is:

            if ($result) {
              zen_record_admin_activity('Updated featured product with featured_id ' . (int) $v_featured_id . ' via EP4.', 'info');
            }

This if statement follows the execution of an execute query. In this case the query was doing an update of a featured item within the admin/easypopulate_4_import.php file. Notice how it gives "credit" to the application that performed the modification. My suggestion would be to at least recognize this plugin and perhaps in addition to EP4.

mesnitu commented 8 years ago

Hi Yep, First I had that, but after a while the admin record activity was completely full in a short time. Also, has the querys were slow, I thought that I could remove that. For me is useless.

I don't see much sense saving all this book's related fields for every book. For the product id yes, makes sense. But every ISBN report, book pages report, condition report....who cares ?
But, if it's necessary, I'll do it. It's just adding to the import file.

But I'm on template work , really need to finish this thing first. I'm on 155 and 155a is here already. I'm afraid when I finish , 1.6 is out :) Only after I can go back to the code.

mc12345678 commented 8 years ago

Well, there certainly is some trade-off to consider... The logging could be something that is done "at the end" I would think and could be a summary of the changes... I may need to take a look at modifying how EP4 does this and see if there aren't some efficiencies that can be gained. The goal basically seems to be to be to see/be able to see what has changed, from what, to what, and who did it... That way when "someone" sees that there is something different or perhaps something is suspiciously different that there are records about who did what. I get you though... It is also why I listed it, that way at some point can come back to it. I was going to identify it a while back but thought I'd give you some time with your code. :)

mesnitu commented 8 years ago

This as been adress on this testing tree. It' not reporting everything, but new authors, publishers, isbn, series, that I think are more relevant. Books condition, printing , etc...I personally think that are uselless information, but, one can add them too. https://github.com/mesnitu/EasyPopulate-4.0-BookX/tree/some_fixes