Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    The Zen Cart v1.5.4 admin-level scripts (e.g. the popular ones like customers.php and orders.php) are now sprinkled with calls (for PCI compliance) to a new function named zen_record_admin_activity.

    I've created a compatibility script so that anyone who supports a plugin that modifies admin-level core files can merge their plugin's changes with the Zen Cart v1.5.4 version of the file and have that version continue to operate on Zen Cart versions v1.5.0 through v1.5.3.

    I'd like to request that anyone using these scripts keep the name that I've assigned to them. That way, if a store owner installs multiple plugins that use the compatibility script, there's only one version of the script actually installed in their store.

    The script is simple in nature; it's auto-loaded just after the admin-level class file that defines the function in Zen Cart v1.5.4. When the script loads, it defines a dummy function with the same name/interface if that function is not already defined (i.e. you're not running Zen Cart v1.5.4). That way, the v1.5.4 changes you merge into your plugin's scripts will operate on earlier versions.

    Two files are needed:

    1 - /YOUR_ADMIN/includes/auto_loaders/config.zc154_compatibility.php
    Code:
    <?php
    // -----
    // Load the Zen Cart v1.5.4 compatibility module.
    // Copyright (c) 2014 Vinos de Frutas Tropicales
    //
    $autoLoadConfig[65][]  = array ('autoType' => 'init_script',
                                    'loadFile' => 'init_zc154_compatibility.php');
    2- /YOUR_ADMIN/incudes/init_includes/init_zc154_compatibility.php
    Code:
    <?php
    // -----
    // Common Module (used by many of my plugins) to provide downward compatibility to Zen Cart v1.5.4 admin-level changes.
    // Copyright (c) 2014 Vinos de Frutas Tropicales
    //
    if (!defined('IS_ADMIN_FLAG')) {
        die('Illegal Access');
    }
    // -----
    // This plugin uses a Zen Cart v1.5.4 "core-file base".  One or more files overwritten for this plugin make
    // use of a function (zen_record_admin_activity) that was introduced in Zen Cart v1.5.4.  That function (present in
    // /admin/includes/classes/class.admin.zcObserverLogEventListener.php) loads at checkpoint 65.
    //
    // This init-file, also loaded at CP-65, provides the definition for the zen_record_admin_activity function IF IT IS
    // NOT PREVIOUSLY DEFINED.  That way, the various functions in the overwritten corre files will have their function-interface
    // satisfied.
    //
    if (!function_exists ('zen_record_admin_activity')) {
      function zen_record_admin_activity ($message, $severity) {
      }
    }

  2. #2
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    I have NEVER been a fan of creating multiple "versions" of a module simply to support older versions of Zen Cart.. It's TOO much work required of me for a FREE thing, and IMHO, you should simply use the version of the module that's compatible with the version of the base software you are using.. If you want the NEW version with the NEW changes, you need to UPGRADE your store..

    Anyway I digress.. Am I understanding correctly that with this little gem I DON'T have to do that.. Cause frankly the compatibility thing with regards to some of the newer versions of the v1.5.x Zen Cart releases is kinda why I've been dragging my feet on submitting the latest COWOA (which includes a BUNCH of cool new usability changes), Super Orders, and to a lesser degree IH4.. I REALLY didn't want to deal with all the potential "is this compatible with Zen Cart v1.5.0 and v1.5.1" questions..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    Quote Originally Posted by DivaVocals View Post
    ... Anyway I digress.. Am I understanding correctly that with this little gem I DON'T have to do that.. Cause frankly the compatibility thing with regards to some of the newer versions of the v1.5.x Zen Cart releases is kinda why I've been dragging my feet on submitting the latest COWOA (which includes a BUNCH of cool new usability changes), Super Orders, and to a lesser degree IH4.. I REALLY didn't want to deal with all the potential "is this compatible with Zen Cart v1.5.0 and v1.5.1" questions..
    You are understanding correctly. This compatibility script essentially provides a stub function for the ZC1.5.4 (and later) versions of the admin-level scripts. The override won't occur on ZC1.5.4+, since the function already exists.

    This allows you (and other plugin authors) to create a single version of their offerings that runs in pre- and post-1.5.4 environments, while integrating the most recent versions of the Zen Cart "base" admin-level scripts.

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    Quote Originally Posted by lat9 View Post
    You are understanding correctly. This compatibility script essentially provides a stub function for the ZC1.5.4 (and later) versions of the admin-level scripts. The override won't occur on ZC1.5.4+, since the function already exists.

    This allows you (and other plugin authors) to create a single version of their offerings that runs in pre- and post-1.5.4 environments, while integrating the most recent versions of the Zen Cart "base" admin-level scripts.
    NICE!!! How awesome are you???

    Pretty d@mn awesome I think!!!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,699
    Plugin Contributions
    123

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    @lat9, thanks for doing this. May I trouble you to package this up and submit it to the plugins area so people can find it there too?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    No problem, swguy! I'll get right on it.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    I've just finished uploading the script to the plugins; once approved, it will be available here: http://www.zen-cart.com/downloads.php?do=file&id=1945

  8. #8
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    Quote Originally Posted by lat9 View Post
    I've just finished uploading the script to the plugins; once approved, it will be available here: http://www.zen-cart.com/downloads.php?do=file&id=1945
    YEAH

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    Quote Originally Posted by lat9 View Post
    I've just finished uploading the script to the plugins; once approved, it will be available here: http://www.zen-cart.com/downloads.php?do=file&id=1945
    Now available for download ...

  10. #10
    Join Date
    May 2009
    Location
    Travelers Rest, SC
    Posts
    21
    Plugin Contributions
    0

    Default Re: ZC1.5.4 backward Compatibility: Plugins with admin-level core-file overwrites

    Am I to understand this correctly? I've been using "stock by attribute_1.5.3 with v1.5.0 of ZC. I have found that it still works properly...until v1.5.4.

    If I install this module of yours, it will then make SBA1.5.3 compatible with ZC1.5.4?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 ZC1.5.5 Admin Backward Compatibility
    By lat9 in forum Contribution-Writing Guidelines
    Replies: 8
    Last Post: 26 Feb 2016, 04:07 PM
  2. Error Core Files in File Manager
    By perkiekat in forum Upgrading from 1.3.x to 1.3.9
    Replies: 8
    Last Post: 8 Aug 2010, 10:37 PM
  3. Database backward compatibility?
    By gaw in forum General Questions
    Replies: 7
    Last Post: 1 Jan 2008, 10:09 PM
  4. Large file in my store directory - core!
    By tbrides in forum General Questions
    Replies: 1
    Last Post: 22 Dec 2006, 03:27 PM

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