Results 1 to 10 of 22

Hybrid View

  1. #1
    Join Date
    May 2004
    Posts
    101
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    Thank you so much for offering to help but doesn't that just keep the text from displaying?

    I apologize for not being clear.
    I want to remove this function completely from the admin header. I found the code but since it is in the admin I want to be sure to only remove the code that checks for updates.
    -Jeff
    ----------------------------

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    J,
    I guess I am stumped for the moment, Need some coffee,
    Wait for a Zen master to read the thread for the answer.
    Sorry I could not assist you.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: Remove the Updates Button

    If you just want to remove the button, find..

    admin/includes/header.php

    comment out this line..

    if ($zv_db_patch_ok == true || $version_check_sysinfo==true ) $new_version = '<a href="' . $url . '">' . zen_image_button('button_check_new_version.gif',IMAGE_CHECK_VERSION) . '</a>';

  4. #4
    Join Date
    May 2004
    Posts
    101
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    Thanks I have found SHOW_VERSION_UPDATE_IN_HEADER in the admin header.php file but can not find the switch in the admin.
    -Jeff
    ----------------------------

  5. #5
    Join Date
    May 2004
    Posts
    101
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    That did not remove the function from the admin header. I am stumped on how to do this. I thought Zencart could do anything.
    -Jeff
    ----------------------------

  6. #6
    Join Date
    Oct 2007
    Location
    Safford, AZ
    Posts
    323
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    Honestly can't see why this would want to be done? However, in the admin/includes/header.php look for the following code and comment out as I have noted in red the entire section about the updates.


    // display alerts/error messages, if any
    if ($messageStack->size > 0) {
    echo $messageStack->output();
    }
    /*
    // check version with zen-cart server
    // ignore version-check if INI file setting has been set
    $version_from_ini = '';
    $version_ini_sysinfo = '';
    $version_ini_index_sysinfo = '';
    if (!isset($version_check_sysinfo)) $version_check_sysinfo = false;
    if (!isset($version_check_index)) $version_check_index = false;

    if (file_exists(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini')) {
    $lines=@file(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini');
    foreach($lines as $line) {
    if (substr(trim($line),0,14)=='version_check=') $version_from_ini=substr(trim(strtolower(str_replace('version_check=','',$line)) ),0,3);
    if (substr(trim($line),0,41)=='display_update_link_only_on_sysinfo_page=') $version_ini_sysinfo=trim(strtolower(str_replace('display_update_link_only_on_sy sinfo_page=','',$line)));
    if (substr(trim($line),0,46)=='display_update_link_on_index_and_sysinfo_page=') $version_ini_index_sysinfo=trim(strtolower(str_replace('display_update_link_only _on_sysinfo_page=','',$line)));
    }
    }
    // ignore version check if not enabled or if not on main page or sysinfo page
    if ((SHOW_VERSION_UPDATE_IN_HEADER == 'true' && $version_from_ini !='off' && ($version_check_sysinfo==true || $version_check_index==true) && $zv_db_patch_ok == true) || $version_check_requested==true ) {
    $new_version = TEXT_VERSION_CHECK_CURRENT; //set to "current" by default
    $lines = @file(NEW_VERSION_CHECKUP_URL);
    //check for major/minor version info
    if ((trim($lines[0]) > PROJECT_VERSION_MAJOR) || (trim($lines[0]) == PROJECT_VERSION_MAJOR && trim($lines[1]) > PROJECT_VERSION_MINOR)) {
    $new_version = TEXT_VERSION_CHECK_NEW_VER . trim($lines[0]) . '.' . trim($lines[1]) . ' :: ' . $lines[2];
    }
    //check for patch version info
    // first confirm that we're at latest major/minor -- otherwise no need to check patches:
    if (trim($lines[0]) == PROJECT_VERSION_MAJOR && trim($lines[1]) == PROJECT_VERSION_MINOR) {
    //check to see if either patch needs to be applied
    if (trim($lines[3]) > intval(PROJECT_VERSION_PATCH1) || trim($lines[4]) > intval(PROJECT_VERSION_PATCH2)) {
    // reset update message, since we WILL be advising of an available upgrade
    if ($new_version == TEXT_VERSION_CHECK_CURRENT) $new_version = '';
    //check for patch #1
    if (trim($lines[3]) > intval(PROJECT_VERSION_PATCH1)) {
    // if ($new_version != '') $new_version .= '<br />';
    $new_version .= (($new_version != '') ? '<br />' : '') . '<span class="alert">' . TEXT_VERSION_CHECK_NEW_PATCH . trim($lines[0]) . '.' . trim($lines[1]) . ' - ' .TEXT_VERSION_CHECK_PATCH .': [' . trim($lines[3]) . '] :: ' . $lines[5] . '</span>';
    }
    if (trim($lines[4]) > intval(PROJECT_VERSION_PATCH2)) {
    // if ($new_version != '') $new_version .= '<br />';
    $new_version .= (($new_version != '') ? '<br />' : '') . '<span class="alert">' . TEXT_VERSION_CHECK_NEW_PATCH . trim($lines[0]) . '.' . trim($lines[1]) . ' - ' .TEXT_VERSION_CHECK_PATCH .': [' . trim($lines[4]) . '] :: ' . $lines[5] . '</span>';
    }
    }
    }
    // display download link
    if ($new_version != '' && $new_version != TEXT_VERSION_CHECK_CURRENT) $new_version .= '<br /><a href="' . $lines[6] . '" target="_blank">'. TEXT_VERSION_CHECK_DOWNLOAD .'</a>';
    } else {
    // display the "check for updated version" button. The button link should be the current page and all param's
    $url=(isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : zen_href_link(FILENAME_DEFAULT);
    $url .= (strpos($url,'?')>5) ? '&vcheck=yes' : '?vcheck=yes';
    if ($zv_db_patch_ok == true || $version_check_sysinfo==true ) $new_version = '<a href="' . $url . '">' . zen_image_button('button_check_new_version.gif',IMAGE_CHECK_VERSION) . '</a>';
    }

    */
    // check GV release queue and alert store owner
    Steve
    Zen cart version: 1.3.9h

  7. #7
    Join Date
    May 2004
    Posts
    101
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    Thank you!

    Why? seems to be the common question.

    Well the main reason is that we are using ZC for pay for classes at a local school. I have different access level permissions set in the admin for the staff so they can access student payment data. The less things they have to "play with" back there the better. I have many sites running zen-cart and keep them updated myself. There is no need for the check for updates function for me other than it is cool. So as not to confuse the staff I am removing it. I like a clean interface and I have the "everything is there for a reason" philosophy.
    Hope that sheds some light on my wacky request.
    :)
    -Jeff
    ----------------------------

  8. #8
    Join Date
    May 2004
    Posts
    101
    Plugin Contributions
    0

    Default Re: Remove the Updates Button

    I tried commenting out the code as suggested above and am receiving the forrlwing error:
    Parse error: syntax error, unexpected '?' in /home/xxxxx/public_html/xxxx/admin/includes/header.php on line 234
    -Jeff
    ----------------------------

 

 

Similar Threads

  1. How can I remove the home button in the bottom of the page?
    By jottoleivi in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 13 Mar 2019, 05:05 PM
  2. Remove the CHECK FOR UPDATES button in admin section
    By Shane78 in forum General Questions
    Replies: 11
    Last Post: 3 Feb 2009, 06:42 PM
  3. Remove check for updates button
    By Ident in forum General Questions
    Replies: 1
    Last Post: 17 May 2008, 01:22 PM
  4. Can I remove the "notify me of updates.." part in checkout?
    By Azeela in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Apr 2008, 10:33 PM

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