Can someone identify which download section this mod is stored in? I've looked in all the sections listed on http://www.zen-cart.com/index.php?ma...index&cPath=40 and I don't see anything titled "Search log".
Thanks.
Mark
Can someone identify which download section this mod is stored in? I've looked in all the sections listed on http://www.zen-cart.com/index.php?ma...index&cPath=40 and I don't see anything titled "Search log".
Thanks.
Mark
Someone hen ?
How about this page: http://www.seamless-packages.co.uk/z..._analyser.html
is the title descriptive enough ? I have read through this very same topic and found it along the conversation.
Thanks for the URL. I had thought from the previous messages that the most up-to-date version was supposed to be located in the downloads section of the zen-cart.com site.
In case the author is looking on: The ZIP file contains a number of bak versions of the php files. And as someone else noted in a previous message in this thread, the CREATE TABLE SQL statement in install.txt needs a semi-colon at the end.
I began installing the mod on a test site that has Zen Cart 1.2.4.1 installed. I got stalled at step 3, because that older version of ZC has a different includes/modules/pages/advanced_search_result/header_php.php. I know - time to upgrade!
I get the same kind of error. It appears that this line:
in the addition to includes/modules/pages/advanced_search_result/header_php.php results in the literal string TABLE_SEARCHLOG rather than the value of the constant:Code:$searchsql = "insert into " .DB_PREFIX. TABLE_SEARCHLOG . " (searchterm, date) values ('". $keyword ."','$mydate')";
Is there a problem with the above, or is .\admin\includes\languages\english\extra_definitions\search_log.php (where TABLE_SEARCHLOG is defined) not getting loaded?
Did you (or anyone else) figure out how to fix this problem?
Thanks.
The install.txt SQL code for creating the search_log table also has an unbalanced backquote on this line:
The search_log.sql file including in the mod's ZIP file has syntax that works:Code:date` date default '0000-00-00',
Code:DROP TABLE IF EXISTS `search_log`; CREATE TABLE `search_log` ( `id` int(11) NOT NULL auto_increment, `searchterm` varchar(255) default NULL, `date` date default '0000-00-00', PRIMARY KEY (`id`) ) TYPE=MyISAM;
When installing Search Log make sure you use the search_log.sql file (located in the same directory as the install.txt file) for step 1 instead of the FUBAR script in the install instructions.
Change Step 4 to the following code since TABLE_SEARCHLOG isn' t defined in the non-admin side.
$mydate = date("Y-m-d");
$keyword = (strip_tags(trim($_GET['keyword'])));
$searchsql = "insert into " .DB_PREFIX. "search_log (searchterm, date) values ('". $keyword ."','$mydate')";
$result = $db->Execute($searchsql);
if (!$result) {
$messageStack->add_session('search', ENTRY_ADV_SEARCH_INSERTION_ERROR);
} ###### End of if statement.
That worked for me...
Gregg Short
[email protected]
Hi
First - thank you for creating this contribution! I have a problem though and am hoping someone can help me please...
Everything seems to work in that no errors appear on any of the search log pages in my admin or in the store. However, no search terms are ever recorded - even when i create a search myself so i know its not just that no one is making any searches. Does anyone have any idea what i've done wrong?
Thanks in advance.
Tiger
OK - I figured it out! In case it helps anyone, i had the header_php.php file in an overide folder. After i moved it out of this folder, it worked but with an error saying that the '...TABLE_SEARCHLOG' doesn't exist. Gregg Short's solution at post 76 fixed this and its now all working (Cheers Greg!). His solution was:
Change Step 4 to the following code since TABLE_SEARCHLOG isn' t defined in the non-admin side.
$mydate = date("Y-m-d");
$keyword = (strip_tags(trim($_GET['keyword'])));
$searchsql = "insert into " .DB_PREFIX. "search_log (searchterm, date) values ('". $keyword ."','$mydate')";
$result = $db->Execute($searchsql);
if (!$result) {
$messageStack->add_session('search', ENTRY_ADV_SEARCH_INSERTION_ERROR);
} ###### End of if statement.
The module is working fine on my zencart, however... I would like to specify IP's of machines that i dont want to record the search.
for example: If somebody search something from my shop computer, or from my office.. I dont want to record that search, because I am not interested to see what I searched for.. I am only interested to see what other people searched for..
I was thinkins something like:
If IP_Number = xxxxxxx {
save = false
}
I didnt look at the code and I am not php specialyst but.. I think it cant be too dificult.
thanks
Has anyone else found that, with Search Log installed, searching for a string containing an apostrophe causes an error? For example, if I search for the string "olive's oil" (without or with the surrounding double quotation marks):
Likewise when searching for 'olive oil' (with surrounding apostrophe's, a.k.a. single quotation marks).Code:1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's oil', exit_page_name='Search Results', num_clicks=num_clicks+1, added_cart='fa' at line 1 in: [UPDATE supertracker SET last_click = NOW(), exit_page='/devmhf2/store/index.php?main_page=advanced_search_result &search_in_description=1&keyword=olive's oil', exit_page_name='Search Results', num_clicks=num_clicks+1, added_cart='false', categories_viewed='b:0;', products_viewed='', customer_id='0', completed_purchase='false', cart_contents='', cart_total = '0', order_id = '0' WHERE tracking_id='50']
The apostrophe character doesn't appear to cause any problems in stock ZC 1.3.7.1.
Thanks,
Mark
Bookmarks