How to package an extension in Magento

Dream. Dare. Do – that is Suyati’s work principle in a nutshell.

Oct
03
2013
  • Author:
  • NaveenBos

In Magento community we can see lot of extensions, how are they packaging and uploading to the community? Now we are looking into packaging Magento extension. As we know that the extension files are located in app/code/local folder. For Creating an Extension Package in Magento have a certain procedures.

Login to Magento admin panel in your browser.

Navigate to System > Magento Connect > Package Extensions this takes you to the Creating a Extension Package, it contains below tabs.

  • Package info
  • Release info
  • Authors
  • Dependencies
  • Contents
  • Load Local Changes

1) Package info:

Package info

Package info contains

Name – (Required) The name of an extension can be a combination of letters (a-z or A-Z), numbers (0-9), and the underscore character (_). Other characters are not allowed.
The name used in this field will be your extension key. It is case-sensitive.

Channel – (Required)

If you are using Magento 1.5 or later to package your extension type: community.

If the wrong channel is used during the packaging process, you will receive an error and will have to resubmit it.

Supported releases –

Select the option 1.5.0.0 & later if this extension supports Magento versions 1.5.x and later.

For these releases, the package will be saved in the magento/var/connect directory.

Summary and Description –

Provide a brief summary and description about the extension. This is a required field. Magento uses this information in the extension review process. The summary will be displayed in the Magento Connect Manager Admin.

License

Possible licenses as stated on the Magento community website is:

  • Open Software License (OSL)
  • Mozilla Public License (MPL)
  • Massachusetts Institute of Technology License (MITL)
  • GNU Lesser General Public License (LGPL)
  • GNU General Public License (GPL)
  • Berkeley Software Distribution License (BSDL)
  • Apache Software License (ASL)
  • Academic Free License (AFL)

You can specify another (commercial) license if you distribute the extension package as paid.
 
magento contact button

License URL

Use this field to link to the license text. It is not required, but recommended, http://opensource.org/licenses/osl-3.0.php

2) Release info

release info

Release Version

The release version can be any arbitrary number value that you want to use as the base version. This is often set to 1.0.0 or 10.0.0.To increment the release version number every time you have to update and repackage this extension. To protect against incorrect release version inputs, Magento Connect will not allow you to upload the same version twice.

Release Stability

Release stability can be set to Alpha, Beta, Stable. Magento connect users are only allowed to install stable release extension. Magento will not approve the stability Development release, this option is used for testing purpose only.
Notes: You can add any notes related to this release.

3) Authors

Authors

Here give the real name, user name, and email address of all members who contributed to this extension.The first user must match the user name of your magentocommerce.com. This account used to display your extensions on Magento Connect.

4) Dependencies

It is used to specify the dependencies of our code in regard to the php version. If we add dependencies during the installation time Magento will check it in regard to all versions specified for it, and if dependent extensions are not installed, Magento Connect Manager (MCM) offers to install them.

Dependencies

5) Contents

It is the most important sections in the extension packaging process.For proper compilation of extension package contents use the following. If your magento local file module is located in app/code/local it will automatically goes there so we have to specify the module name.

EX:- Magento Community module file – ./app/code/community

from drop down select Magento Community module file, and just give the module name inside the textbox, it will take like ./app/code/community/Module name

  • Magento Local module file – ./app/code/local
  • Magento Community module file – ./app/code/community
  • Magento Core team module file – ./app/code/core
  • Magento User Interface (layouts, templates) – ./app/design
  • Magento Global Configuration – ./app/etc
  • Magento PHP Library file – ./lib
  • Magento Locale language file – ./app/locale
  • Magento Media library – ./media
  • Magento Theme Skin (Images, CSS, JS) – ./skin
  • Magento Other web accessible file – ./
  • Magento PHPUnit test – ./tests
  • Magento other – ./

Contents

after this click Save Data and Create the Package.This will save it in a package data file and create a package file.Once the filled data’s correct the package files created in magento/var/connect/

The package data file is an XML document that stores the rules for building the package.

6) Load Local Package

We can see the saved and created package data from the load local package tab.

Notes: The packaging extension in this article is only applicable for Magento1.5 and later versions

Leave a Comment

Your email address will not be published. Required fields are marked *