When a plugin requires additions to the database, these can be done by
a) a separate sql file to be run in the admin SQL patch tool or (when it fails), phpMyadmin.
b) an autoinstaller included as part of the admin files.
There are two issues I would like to raise.
1) What is the recommendation?
I prefer a), no question.
Why?
Zen Cart is DIY.
Users have to learn. Insulating them from the install process is dumbing-down and when it does not work (which has prompted this post), you have to start digging through files to find out why. Seeing the sql code fail is a pretty good heads-up that something needs attention.
I believe in banging on and on about not trusting any third party code in your site, they are all of wildly-varying quality and compatibility, and just letting it blindly alter your database is nuts.
The smoother the install process is, the more a false sense of security it generates.
2) I see auto installers that self-delete the install file.
I think this is wrong.
The first installation of any plugin should be in a DEVELOPMENT server and so only after checking/fixing/customising the fileset, it gets uploaded to the production shop...but is now missing the installer. I think the plugin fileset should be maintained complete.
I think the init that does the install should just check for the existence of some function or constant related to the plugin and then return if found.
The overhead is minimal.
Bookmarks