Be very careful with the keywords. They can be very dangerous - especially during SQL injections.
From your installation.txt file, (v0.3 release),
find:
PHP Code:
$keyword = string utf8_encode ($_GET['keyword']);
$table_exists = $db->Execute("insert into zen_search_log (searchterm, date) values ('$keyword','$mydate')");
replace with:
PHP Code:
$keyword = (strip_tags(trim(string utf8_encode($_GET['keyword']))));
$table_exists = $db->Execute("insert into " . TABLE_SEARCHLOG . " (searchterm, date) values ('$keyword','$mydate')");
This patch also fix the SQL table name in case some users might use different prefix with their SQL database over Zen-Cart. Otherwise, errornous could be involved. 
Now, fixes for index.php file.
From the v0.2 release, you asked your beta-testers to add a specific block into admin/index.php file.
Replace that whole block -
with this one:
PHP Code:
<div class="reportBox">
<div class="header"><?php echo SEARCHLOG_TOP_5; ?></div>
<?php
echo "<table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\">
<tr>
<td width=\"110\"><b>" . SEARCHLOG_TERM . "</b></td>
<td><b>" . SEARCHLOG_COUNT . "</b></td>
</tr>";
$color1 = "#F8E7F9";
$color2 = "#BFD8BC";
$row_count = 0;
$sql = "SELECT searchterm, count(*) AS Number
FROM " . TABLE_SEARCHLOG . "
WHERE searchterm is not null and searchterm not like ''
GROUP BY searchterm
ORDER BY Number desc limit 0,5";
$result = mysql_query($sql);
if (!$result) {
$messageStack->add(ENTRY_SEARCHLOG_ID_NOT_FOUND, 'error');
} ###### End of if statement.
while ($row = @mysql_fetch_array($result)) {
$searchterm = (isset($row["searchterm"]) && !empty($row["searchterm"])) ? trim($row["searchterm"]) : "";
$number = (isset($row["Number"]) && $row["Number"] != 0) ? intval(trim($row["Number"])) : 0;
/* Now we do this small line which is basically going to tell
PHP to alternate the colors between the two colors we defined above. */
$row_color = ($row_count % 2) ? trim($color1) : trim($color2);
// Echo your table row and table data that you want to be looped over and over here.
echo "<tr>
<td width=\"110\" bgcolor=\"$row_color\" nowrap>" . $searchterm . "</td>
<td bgcolor=\"".$row_color."\">" . $number . "</td>
</tr>";
// Add 1 to the row count
$row_count++;
}
// Close out your table.
echo "</table>";
echo '<a href=' . zen_href_link(FILENAME_SEARCH_LOG, '', 'NONSSL'). '>' . VIEW_SEARCH_LOG . '</a>';
?>
</div>
Then, under your admin/includes/languages/english/index.php file, add the following content on top of the ?> tag:
PHP Code:
//---------------------------------------------
//--- Search logs language definitions --------
//---------------------------------------------
define('SEARCHLOG_TERM', '<b>Search Term</b>');
define('SEARCHLOG_TOP_5', 'Search Log Top 5');
define('SEARCHLOG_COUNT', '<b>count</b>');
define('VIEW_SEARCH_LOG', 'View Search Log');
define('ENTRY_SEARCHLOG_ID_NOT_FOUND', 'Error: Search ID could not be found.');
define('ENTRY_SEARCHLOG_EMPTY_ROWS', 'There are currently no search logs entries in your ' . DB_PREFIX. TABLE_SEARCHLOG . ' table. ');
Then, under your admin/includes/languages/english/html_includes folder, create a filename called: searchlog.php (note: That is NOT a suggestion but as part of the steps).
Then, add the following content inside:
PHP Code:
<?php
//---------------------------------------------
//--- Search logs language definitions --------
//---------------------------------------------
define('BOX_REPORTS_SEARCH_LOG','Search Log');
define('HEADING_TITLE','Search Log');
define('DATE_RANGE', '<strong>Date Range </strong>');
define('MATCH_SEARCH_TERM', '<strong>Match search term </strong>');
define('MATCH_SEARCH', '<strong>Search Match </strong>');
define('NUMBER_TIMES_SEARCHED_FOR', '<b>Number of times searched for</b>');
define('GLOBAL_ACTIONS', '<strong>Global Actions </strong>');
define('INFO', '<strong>Info</strong>');
define('COMING_SOON', '<strong>coming soon</strong>');
define('ENTRY_DELETE_LINK', '[ DELETE ] <b>cannot undo</b>');
define('ENTRY_SEARCHLOG_DELETE_SUCCESSFUL', 'Success ! Selected item deleted:');
define('ENTRY_SEARCHLOG_DELETE_FAILED', 'Error: Failed to delete the selected item named:');
define('SEARCHLOG_FAILED_TO_SELECT_FIELDS', 'Error: Failed to select one or more fields from the ' . TABLE_SEARCHLOG . '. It might, also, be possible that your table is empty.');
define('SEARCHLOG_DATE', '<b>Date</b>');
define('SEARCHLOG_ACTION', '<b>Action</b>');
define('SEARCHLOG_SELECT_PAGE', '<center>Select a Page</center>');
define('SEARCHLOG_PREVIOUS_PAGE', '<< Previous');
define('SEARCHLOG_NEXT_PAGE', 'Next >>');
define('COPYRIGHT_AUTHOR_URL', 'Built by: <a href=\"http://www.seamless-packages.co.uk\">Seamless-packages</a><br />Author: Warren Lloyd <br />Version: 0.1 beta');
?>
Then, on your next package, make sure to include the following folder inside with the bug fixes:
- includes/extra_datafiles/searchlog.php.
Then, add this inside that file:
PHP Code:
<?php
define('TABLE_SEARCHLOG', 'search_log');
?>
Once you're done with these insertions, this release should, now, be considered as a final release for bug fixes. From there, I will dig into my personal library to see if I can find the exporter modules in order to adapt them over Zen-Cart.
Until then - enjoy !