• About
  • Requests
  • Free Add-ons
  • Paid Add-ons
    • Admin Access Levels
    • Bundler
    • Data Wizard
    • Menu Master
    • Master Password
    • Order Editor
    • Payment
      • Braintree – Apple Pay
      • Braintree – Credit Cards
    • Price Levels
    • Product Manager
    • PDF
      • PDF Invoices
      • PDF Packing Slips
    • Reporting Tool
    • Shipping
      • UPS Pro
  • Reviews
  • My account
  • Docs
  • Forums
  • DEMO
  • About
  • Requests
  • Free Add-ons
  • Paid Add-ons
    • Admin Access Levels
    • Bundler
    • Data Wizard
    • Menu Master
    • Master Password
    • Order Editor
    • Payment
      • Braintree – Apple Pay
      • Braintree – Credit Cards
    • Price Levels
    • Product Manager
    • PDF
      • PDF Invoices
      • PDF Packing Slips
    • Reporting Tool
    • Shipping
      • UPS Pro
  • Reviews
  • My account
  • Docs
  • Forums
  • DEMO
home/Knowledge Base/Free Addons/Core Compare Tool

Core Compare Tool

377 views 5 September 9, 2020 March 30, 2021

Add-on Name: Core Compare Tool
Version: 0.4.0
Updated: 03/17/2021
Supports CE Phoenix: >= 1.0.7.5
Supports OS Commerce:  >= 2.3.4.0

Description of Add-on

This admin tool will allow you to download a copy of the core version you are using and compare it to your installed version. It will then outline:

  • Added Files
  • Changed Files
  • Deleted Files

You can also remove cores as you upgrade.

Screenshot(s)

Change Log

  • 0.4.0 (03/14/2021)
    • Added logic to handle the rebranding of Phoenix so that files are not considered altered due to copyright message and comment blocks changing in files.
  • 0.3.1 (03/17/2021)
    • Fixed error being thrown in settings page
  • 0.3.0 (03/14/2021)
    • Added extra logic required for Phoenix >= 1.0.8.0
  • 0.2.0 (03/04/2021)
    • Adjusted code to handle latest Phoenix Core Changes
  • 0.1.6 (02/05/2021)
    • Fixed issue with file compare and line endings
  • 0.1.5 (09/09/2020)
    • Code cleanup
    • Added settings page
    • Added exclude directories option to ignore certain folders
  • 0.1.4 (09/02/2020)
    • Changed exec() to use scandir() for directories
    • Fixed error as there was a single <? short tag in code
    • Fixed some syntax issues that created errors in earlier versions of PHP 7
  • 0.1.3 (08/27/2020)
    • Fixed some layout issues in Google Chrome for table formatting
  • 0.1.2 (08/22/2020)
    • Added replace feature for missing or altered files to revert them to core version
  • 0.1.1 (08/20/2020)
    • removed this tool from Zipur Toolbox and made it a stand alone tool
  • 0.1.0 (08/06/2020)
    • Initial Release

Download(s)

You can now download this addon from the Phoenix Cart Forum Addons Library

https://phoenixcart.org/forum/app.php/addons/free_addon/core_compare_tool/

Tags:PhoenixOS CommerceApp

Do you like this item?

5 Yes  No
Related Articles
  • Fav Icon
  • Google Fonts
  • Left Admin Menu
  • Product Image Zoom
  • Info Pages – Pretty URLs
  • USPS Shipping Module
7 thoughts on “Core Compare Tool”
  • vmn says:
    Log in to Reply

    I usually have some “garbage” files like *.php.orig, when testing things. I made the changes below to only compare php, css and js files.

    //VMN Added endsWith
    function endsWith($string, $endString)
    {
    $len = strlen($endString);
    if ($len == 0) {
    return true;
    }
    return (substr($string, -$len) === $endString);
    }
    //VMN Added endsWith

    /** Create a nested array from a directory root
    *
    * @param $path
    * @param array $ignorefolders
    * @param int $type
    * @param false $convertadmin
    */
    function zipGetDirArray( $path, $ignorefolders = [], $type = 0, $convertadmin = false ) {

    global $installedfiles, $cleancorefiles, $version, $customadminpath;
    $files = scandir( $path );
    foreach ( $files as $file ) {
    if ( $file == ‘.’ || $file == ‘..’ ) {
    //do nothing
    } else if ( is_dir( $path . ‘/’ . $file ) ) {
    if ( ( in_array( basename( $file ), $ignorefolders ) ) ) {
    //do nothing for ignored folders
    } else {
    zipGetDirArray( $path . ‘/’ . $file, $ignorefolders, $type, $convertadmin );
    }
    } else {
    if ( ( in_array( basename( $file ), $ignorefolders ) ) ) {
    //do nothing for ignored files
    } else {
    //VMN only check php, css and js files
    if ( endsWith( $file, ‘.php’ ) || endsWith( $file, ‘.css’ ) || endsWith( $file, ‘.js’ ) ) {
    if ( empty( $type ) ) {
    $keypath = $path . ‘/’ . $file;
    $keypath = str_replace( DIR_FS_CATALOG, ”, $keypath );

    if ( $convertadmin ) {
    $keypath = preg_replace( ‘/^\/’ . $customadminpath . ‘/’, ‘/admin’, $keypath, 1 );
    }

    $installedfiles[ $keypath ] = hash_file( ‘md5’, $path . ‘/’ . $file );
    } else if ( $type == 1 ) {
    $keypath = $path . ‘/’ . $file;

    $ospath = ( zipCheckIfPhoenix() ) ? ‘CE-Phoenix-‘ : ‘oscommerce-‘;
    $ospath2 = ( zipCheckIfPhoenix() ) ? ” : ‘/catalog’;
    $keypath = str_replace( DIR_FS_ADMIN . ‘clean_core/’ . $ospath . trim( $version ) . $ospath2, ”, $keypath );
    $keypath = preg_replace( ‘/^\/admin/’, ‘/’ . $customadminpath . ”, $keypath, 1 );
    $cleancorefiles[ $keypath ] = hash_file( ‘md5’, $path . ‘/’ . $file );
    } else if ( $type == 2 ) {

    //ignore any non-php files for catching patch versions
    if ( strpos( $file, ‘.php’ ) !== false ) {
    $keypath = $path . ‘/’ . $file;
    $cleancorefiles[] = $keypath;
    }

    }
    }
    //VMN only check php, css and js files
    }
    }
    }
    }

    December 3, 2020 at 3:42 am
    • @zipurman says:
      Log in to Reply

      I’ll leave the comment here. I may add some extra functionality to ignore files of specified types. Me personally, I want to see all differences, including test files.

      December 4, 2020 at 12:30 pm
  • vmn says:
    Log in to Reply

    This solves the problem, at least in my OpenSuse. Run the command below in the unzipped update package root directory before applying the updates.

    dos2unix –keepdate $(find . -type f -name “*.php”)

    December 3, 2020 at 2:51 am
  • vmn says:
    Log in to Reply

    Does not seem to give correct results, if Phoenix update zip has been used. The update zip files seem to come from a Windows environment. Thus, the files do not match against the full package.

    December 2, 2020 at 11:47 am
    • @zipurman says:
      Log in to Reply

      I have noticed that recently. It never used to do that. I also use *nix, so I am seeing the same result. It hashes the files to make the compare. I will see about changing line endings in files in the clean_core to solve the issue.

      December 2, 2020 at 11:57 am
  • vmn says:
    Log in to Reply

    Hi and thanks for this addon.
    I could not set exclude folders without the following fix:
    in the function zipurRow:
    //VMNif ( $rowdata[0][‘text’] !== ” ) {
    if (isset($rowdata[1][‘text’]) && $rowdata[1][‘text’] !== ” ) {

    $rightdata .= $rowdata[1][‘text’];
    }
    //VMNif ( $rowdata[1][‘text’] !== ” ) {
    if (isset( $rowdata[1][‘field’]) && $rowdata[1][‘field’] !== ” ) {
    $rightdata .= $rowdata[1][‘field’];
    }

    December 2, 2020 at 7:33 am
    • @zipurman says:
      Log in to Reply

      What version of the tool are you using? I dont have a function zipurRow in this tool?

      December 4, 2020 at 12:37 pm
Leave A Comment Cancel reply

You must be logged in to post a comment.




Recent reviews
  • Zipur's Phoenix Bundler (2.x)
    Rated 5 out of 5
    by Daniel Kofod Primdahl
  • Zipur's Phoenix Bundler (2.x)
    Rated 5 out of 5
    by Director - cornishhoney.co.uk
  • Phoenix Data Wizard
    Rated 5 out of 5
    by Zia Haq
  • Phoenix Order Editor by @Iian
  • Phoenix Menu Master
    Rated 5 out of 5
    by Director - cornishhoney.co.uk
  • Phoenix - Zipur's Braintree Credit Card Module
    Rated 5 out of 5
    by Cary Laurenson
  • Phoenix - UPS Pro Shipping Module
    Rated 5 out of 5
    by Cary Laurenson
  • Master Password
    Rated 5 out of 5
    by Patrick
  • Zipur Reporting Tool
    Rated 5 out of 5
    by René
  • Zipur Product Manager
    Rated 5 out of 5
    by Omar
Need an add-on? Request it!

If your idea turns into a Paid Add-on … I’ll give you a copy for free.

Don’t forget to like the Free Add-ons so I know which ones are worth maintaining.

Like  Nope
Docs
  • Phoenix Docs 11
Latest Free Add-ons
  • USPS Shipping Module
  • UPS Shipping Module
  • Simple Header Message
  • ShareThis – Add to product pages
  • Product Image Zoom
  • OSCommerce to CE Phoenix Migration Utility
  • Language Tool (Search/Edit)
  • Info Pages – Pretty URLs
  • Google Fonts
  • Favorite Countries
  • Fav Icon
  • Database Tool
  • Core Compare Tool
  • Canada Post Shipping Module
  • Left Admin Menu
Follow me on YouTube

  • Privacy Policy

© Copyright 2020 Intricate Networks Inc.