Results 1 to 4 of 4

Search Feature on Admin for catalog Crashes Server!!

This is a discussion on Search Feature on Admin for catalog Crashes Server!! within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; oscdox 2.0RC2 Everytime I try to use the search feature at the top of the catalog products/categories section in the ...

      
  1. #1
    New Member
    Join Date
    Sep 2005
    Posts
    18
    Rep Power
    0


    Default Search Feature on Admin for catalog Crashes Server!!

    oscdox 2.0RC2

    Everytime I try to use the search feature at the top of the catalog products/categories section in the admin center it crashes server. The server specs is: Dual Xeon 2.4Ghz, 1 GB ram, RHEL 3, Cpanel, PHP 4.3.10, MySQL 4.0.25.

    Basically what I have been trying to do is search using the model # to see where the product is at with "Top" selected in the "Go To:" drop down.

    I have tested this on an oscommerce install as well and works fine.

    I have also opened a bug report as #0000084 (http://bugtrack.oscmax.com/view.php?id=84)

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default RE: Search Feature on Admin for catalog Crashes Server!!

    This only seems to affect linux based servers, not windows based.

    Here is a fix:

    http://bugtrack.oscmax.com/view.php?id=84
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    Sep 2005
    Posts
    18
    Rep Power
    0


    Default RE: Search Feature on Admin for catalog Crashes Server!!

    Please see my PM, I cant see any of the notes with the fix.

  4. #4
    New Member
    Join Date
    Sep 2005
    Posts
    18
    Rep Power
    0


    Default Fixed and extra functionality! :)

    This has been fixed! :) Thank you for helping us fix this problem!

    I went a little past the fix that was in the bug tracker and wanted to post for anyone that wanted it. This fixes so that the admin can still search by model & now even description as well!

    It is a quick fix in admin/categories.php

    This fix is for oscdox 2.0rc2 (may work in other versions although may not)

    Change (around line 1183) from...
    Code:
          $products_query = tep_db_query("select p.products_ship_price, p.products_id, p.products_model, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' or p.products_model like '%" . tep_db_input($search) . "%' order by pd.products_name");
    To...
    Code:
          $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and (pd.products_name like '%" . tep_db_input($search) . "%'  or p.products_model like '%" . tep_db_input($search) . "%'  or pd.products_description like '%" . tep_db_input($search) . "%') order by pd.products_name");

    And change (around line 1186) from...
    Code:
          $products_query = tep_db_query("select p.products_ship_price, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
    To...
    Code:
          $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
    I have tested this on our machine and is working great for us. :)

Similar Threads

  1. problem with admin panel search function
    By taol in forum osCMax v2 Features Discussion
    Replies: 0
    Last Post: 12-13-2006, 04:15 PM
  2. osCAdminID generated and not letting the admin search
    By sarath26 in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 11-27-2006, 10:53 AM
  3. Little help locating feature in admin please
    By pede in forum osCMax v2 Features Discussion
    Replies: 3
    Last Post: 07-23-2006, 03:58 PM
  4. new server, now getting no modules in admin and errors.
    By red_fraggle in forum osCommerce 2.2 Installation Help
    Replies: 4
    Last Post: 01-19-2005, 10:09 AM
  5. english.php crashes when saved by the built in file editor
    By Trinity in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 09-22-2004, 02:06 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
  •