
Originally Posted by
shrimp-gumbo-mmmhhh
Thanks for your work on this. I realize this is not a paid job and these are just my suggestions for whosoever may want to update this module to make it more excellent.
Hello, yes I did scroll down the screen but this should really be spit out into a file with success and fail notices for each product.
"noting file to look at" if there was a file that contained those errors (it does not currently exists).
Hmmm... you cannot test to see if a sql insert was successful or not? Sorry, so easy to do with languages I have worked with just thought it would be easy in php also.
Thank you for having this working for us currently!
What is the setting you have under configuration->Easy Populate 4->'Debug Logging'? Has it been changed from the default of true?
If it is still set to true, then look at your list of files under 'This contains any other file. They will be processed like a full data file.' (The word They changes to this if there is only one file)
If there were "sql" errors while importing the data then there should be a file "ep_debug_log.txt" in that list. In that file is the query/queries that caused errors. Based on the associated information, the issue(s) should be locatable.
As far as logging the text that appears below the list of files, that is something that can be done using the EP4 function: write_debug_log_4($string) where $string is the text to be logged into the debug log.
So for example in admin/easypopulate_4.php towards the end where:
echo $display_output;
is present, then could add:
write_debug_log_4($display_output);
If want to make it dependent on the debug logging setting from above, then:
Code:
if (EASYPOPULATE_4_CONFIG_DEBUG_LOGGING === 'true') {
write_debug_log_4($display_output);
}
May also then want to incorporate the 'specials' data within the area below that with:
Code:
if (strlen($specials_print) > strlen(EASYPOPULATE_4_SPECIALS_HEADING)) {
echo '<br />' . $specials_print . EASYPOPULATE_4_SPECIALS_FOOTER; // specials summary
if ((EASYPOPULATE_4_CONFIG_DEBUG_LOGGING === 'true') {
write_debug_log_4($specials_print . EASYPOPULATE_4_SPECIALS_FOOTER);
}
}
Remember this is open source so you can do with it what you will and while it has been made available for free download/use, it doesn't mean that there hasn't been some sort of funding by someone to someone at some time. Thankfully Chad Deruski did an outstanding job many years ago with development of so many features and options. As I understand it was developed to support his line of work and then at some point made available for others. He still makes an appearance once in a while.
Note though that you will need to clear that debug file periodically to prevent eating drive space.
Oh and as far as "testing" the SQL, sure two additional lines and some other potential "switch" could be added to the query in the extra_functions file, to perform a transaction that gets reverted, or explained, or an alternate store could be used/tested rather than one's live store (this is a preferred situation so that zero damage is done to one's live store).
Bookmarks