Thread: Search Log

Page 8 of 10 FirstFirst ... 678910 LastLast
Results 71 to 80 of 95
  1. #71
    Join Date
    Jul 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Search Log

    Quote Originally Posted by TheOracle View Post
    It is available on the downloads section section. The title is called as is (Search log).
    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

  2. #72
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Search Log

    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.

  3. #73
    Join Date
    Jul 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Search Log

    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!

  4. #74
    Join Date
    Jul 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Search Log

    Quote Originally Posted by fakeDecoy View Post
    So I modified the file exactly as stated, and I get this error during a search:

    1146 Table 'adamant_zencart.zen_TABLE_SEARCHLOG' doesn't exist in:
    [insert into zen_TABLE_SEARCHLOG (searchterm, date) values ('rk-3e','2007-06-07')]
    I get the same kind of error. It appears that this line:
    Code:
    $searchsql = "insert into " .DB_PREFIX. TABLE_SEARCHLOG . " (searchterm, date) values ('". $keyword ."','$mydate')";
    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:

    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.

  5. #75
    Join Date
    Jul 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Search Log

    Quote Originally Posted by fakeDecoy View Post
    This is the SQL code it gives: ...
    It's missing a semicolon on the end of the second statement. I added it and it added the table, and I no longer get the error.
    The install.txt SQL code for creating the search_log table also has an unbalanced backquote on this line:
    Code:
      date` date default '0000-00-00',
    The search_log.sql file including in the mod's ZIP file has syntax that works:
    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;

  6. #76
    Join Date
    Apr 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Search Log

    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]


    Quote Originally Posted by markmid View Post
    I get the same kind of error. It appears that this line:
    Code:
    $searchsql = "insert into " .DB_PREFIX. TABLE_SEARCHLOG . " (searchterm, date) values ('". $keyword ."','$mydate')";
    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:

    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.

  7. #77
    Join Date
    Oct 2006
    Posts
    56
    Plugin Contributions
    0

    Default Re: Search Log

    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

  8. #78
    Join Date
    Oct 2006
    Posts
    56
    Plugin Contributions
    0

    Default Re: Search Log

    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.


  9. #79
    Join Date
    Nov 2005
    Location
    www.carouseltoyshop.co.uk
    Posts
    20
    Plugin Contributions
    0

    Idea or Suggestion Re: Search Log

    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

  10. #80
    Join Date
    Jul 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Search Log

    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):

    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']
    Likewise when searching for 'olive oil' (with surrounding apostrophe's, a.k.a. single quotation marks).

    The apostrophe character doesn't appear to cause any problems in stock ZC 1.3.7.1.

    Thanks,
    Mark

 

 
Page 8 of 10 FirstFirst ... 678910 LastLast

Similar Threads

  1. Customer Search Log
    By CJPinder in forum Addon Admin Tools
    Replies: 60
    Last Post: 27 Jan 2023, 11:06 PM
  2. log of Search history
    By Genzai in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 14 May 2009, 08:08 PM
  3. Search log mod vs. user tracking
    By ashton0603 in forum General Questions
    Replies: 4
    Last Post: 30 Jan 2008, 08:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR