Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    help question 3rd party contributions overwriting core files

    Hello!

    As I come up to speed on ZC and 3rd part contributions, I have a question, I have learned and with great care installed override folders and files.

    As I begin to install some contributions, I see this in the read me's:

    "Copy the "admin" folder to your zencart root folder. This will
    overwrite admin/index.php and admin/customers.php, and add new
    files."

    Does the mean, it will overwrite the other contributions already installed? and what about the next install, perhaps over the same files?

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: 3rd party contributions overwriting core files

    Hi Dharma.

    At the present there is no real over rides for the admin,

    so Yes if oyu have 2 seperate contribs that will over write admin/index.php
    you need to do a winmerge on them and make sure that you get the relevent code for each one in place,

    make sure to not the changes so that when you upgrade ZC you can easily put the changes BACK into the new admin/index.php
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: 3rd party contributions overwriting core files

    Hello!

    Thank you for your response. I will take careful note of admin files being added to existing core files, what about files in other directories?

    I uploaded "Zen Cart Template base" and it placed handy override folders in my ZC directories. if I do not see a custom folder from this contribution, in a directory, that means I must merge the files correct? ex: includes/functions/

    also I checked out winmerge, looks like its windows only, is there a mac version or other app for mac? perhaps bbedit? that I can use?

    Thanks!

  4. #4
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: 3rd party contributions overwriting core files

    Hello!

    Thank your for your help and putting up with my lack of knowledge. I found that BBedit can compare two files.

    does it matter where I place the additional code? always at the end, or where the 2 files differ (lines 88-110)

  5. #5
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: 3rd party contributions overwriting core files

    the changes need to be where they are listed at in the contrib file,

    the code has to be right where it is for it to work right
    Zen cart PCI compliant Hosting

  6. #6
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: 3rd party contributions overwriting core files

    Hello again and thank you for your time and support.

    When it comes to over writing/backing up core files, is it possible to simply rename older versions and keep them on the server?

    for example:

    original file : admin/index.php

    I add a code and make new admin/index.php

    original file becomes : admin/index_clean_1.3.6.php

    and so on: admin/index_clean_1.3.6+IH2.php

    What would be the proper extension? .bak? .php.bak? something else?

    Would that mess things up? create a security risk? Is this a ridiculously bad idea? if so what would you suggest?

    My computer is a disorganized mess. I would like to keep all my ZC files on the server and back them up on my computer as one ZC Folder, maybe clean up the folders after zc upgrades.

    what do you think?

    Thanks again!

  7. #7
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: 3rd party contributions overwriting core files

    Sometimes keeping the renamed files in the same directory is ok, but other times not. I do not know of a definitive resource which specifies which explains this. I've just learned by trial and error.

    It is best practice to test your custom edits/changes and mod installs on a test/non-production shop and best to back up your files regularly locally. Myself I make my edits/merges locally then upload to the server. Otherwise I would find it difficult to maintain track of my revisions and customizations.

    In the zen cart downloads area look for the document "Overrides Chart" which may help you identify where "custom" override directories can exist. And lots of similar info in the zen cart support wiki.

    Woody

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,543
    Plugin Contributions
    127

    Default Re: 3rd party contributions overwriting core files

    Quote Originally Posted by Woodymon View Post
    In the zen cart downloads area look for the document "Overrides Chart" which may help you identify where "custom" override directories can exist.
    The presence of a "classic" directory is also a good clue.

    Woodymon's suggestion of a test cart is good advice, to which I would add, "keep a change log."
    If you follow practices like this, your changes and upgrades will go more smoothly.

    Good luck,
    Scott
    That Software Guy. My Store: Zen Cart Support
    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.

  9. #9
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: 3rd party contributions overwriting core files

    regarding renaming the original files.. you have to watch out what you rename it to. depending on the folder it may try to include that file even though you don't want it to

    the best way to do it, from my experience, is to add an extension after the .php. so something like .php.bak or something. this ensures it cannot be executed - be careful with what you do this to because even though it cannot be executed, it can be read plain as day. don't do it to configure files :)

 

 

Similar Threads

  1. gv discount in 3rd party payment module
    By kalleMD in forum General Questions
    Replies: 0
    Last Post: 14 Sep 2007, 08:42 AM
  2. Integrating 3rd party search engine
    By paul3648 in forum General Questions
    Replies: 11
    Last Post: 11 May 2007, 04:48 PM
  3. 3rd party contributions you should use
    By domineaux1 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Jan 2007, 06:11 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