Installer Classes

Installer Classes

For most cases the base installer class can be used without customisation to install a plugin.

However there may be times when a plugin needs to override the default installer behavior.

For example a plugin may need to check some pre-requisites before allowing installation.

This may be the availability of a php extension or maybe the plugin relies on another plugin being installed.

In these cases the plugin can define its own installer class that extends the base installer.

The class must be named PluginInstaller.php and be placed in the Installer directory.

e.g.

  • zc_plugins

    • rewardPoints

      • v1.0.0

        • Installer

          • PluginInstaller.php

The skeleton of this class should look like :-

<?php
class PluginInstaller extends BasePluginInstaller
{
}

There are a number of methods that the custom installer class can override.

  • prerequisitesCheck

FIXME




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified July 13, 2020 by brittainmark (6180e4f).