How To Pack Your Add-on

When distributing your add-ons, it's important that users know how to install them. Therefore we have created a guideline on how to pack your add-ons so that all add-ons are wrapped consistently.

Create The Zip Archive

Your .zip archive should contain the following:

File/Folder Description
upload/ or public_html/ A directory of files to upload, relative to the root of the platform
docs/ (optional) A directory with documentations if provided
CREDITS.md (optional) A plain text file with credits to other authors of scripts, graphics, etc.
LICENSE.md (optional) A plain text file with a license statement
README.md A plain text file with instructions how to install the add-on
UPGRADE.md (optional) A plain text file with instructions how to upgrade from a previous version

Example Archive

myaddon.zip
├── upload/
│   └── includes/
│       └── modules/
│           └── payment/
│               └── pm_mymodule.inc.php
└── README.md

The Readme File

A readme file must reside in the root directory of the zip archive. It can be named README.md, README.txt, or README.rtf and should contain instructions how to install the add-on.

README.md:


        __    _ __       ______           __ 
       / /   (_) /____  / ____/___ ______/ /_
      / /   / / __/ _ \/ /   / __ `/ ___/ __/
     / /___/ / /_/  __/ /___/ /_/ / /  / /_  
    /_____/_/\__/\___/\____/\__,_/_/   \__/  
                          www.litecart.net

################
# Instructions #
################

1. Always backup data before making changes to your store.

2. Run the following MySQL query in your favourite database manager i.e. phpMyAdmin:

    {Insert some MySQL code here}

3. Upload the **contents** of the folder upload/ (not the folder itself) to the root of your LiteCart installation.

4. Go to Admin -> Yada yada and play with your new add-on.

________________________________________________________________________

Note: This add-on contains virtual modifications, meaning you can disable it in Admin -> vMods.

The upload/ folder

All files needed to be upload must be placed in a folder named upload/ residing in the root of the zip archive. The files and folders to upload should mirror the contents of the store platform.

Examples:

  • upload/admin/reports.app/new_file.inc.php
  • upload/vmods/my_modification.xml

Revisions

Top Editors
Recently Edited Articles