How to Create an Extension Package File in Magento?

Magento is a wonderful platform to kick start your ecommerce endeavors. But the worst part is its customization. As the coding of this robust platform is often found to be grueling, the ideal way would be to look out for solutions from developers across different parts of the world or from Magento community.

One such common problem confronted by Magento site developers/owners is creating an extension package file.

Today, in this tutorial, I’ll assist you in the process of creating an extension package file in Magento.

How to create an extension package file?

Step 1: Go to Magento root folder then Create new folder connect inside the var folder.

Step 2: Login to Magento admin panel.

Step 3:  Navigate to System > Magento Connect > Package Extensions

A new page to create an Extension Package file will be displayed.Create Extension Package

Also Read: Face Gallery Extension to Showcase Albums from Flickr and Picasa in One Click

Pre-requisites:

Find below six vital tabs on the Create Extension Package page.

  1.  Package info
  2. Release info
  3. Authors
  4. Dependencies
  5. Content
  6. Load Local Changes

In order to create the package extension file, the respective fields in the tabs have to be filled in accurately wherever necessary.

1. Package info

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 as well.

Package

Channel – (Required)

So far, only one channel is available for publishing extensions – community.

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

Supported Releases – (optional)

Select the option 1.5.0.0 and later & Pre-1.5.0.0

The package will be saved in the Magento/var/connect directory.

Summary and Description – (optional)

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 – (optional)

Possible licenses as stated on the Magento community website is: OSL v3.0

License URL- (optional)

Use this field to link to the license text.

http://opensource.org/licenses/osl-3.0.php

It is not required, but recommended.

2. Release info

Release Version- (optional)

The release version can be any arbitrary numerical value that you want to use as the base version. This is often set to 1.0.0 or 5.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

Release Stability-(optional)

Release stability can be set to Alpha, Beta, and Stable. Magento Connect users are only allowed to install stable release extension.

Notes- (optional)

You can add any notes related to this release.

3. Authors

Here give the real name, user name, and email address of all members who contributed to this extension.

authors

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.

Enter Minimum — 5.2.0 and Maximum — 6.0.0

dependencies

5. Contents

This is the most important section in the extension packaging process.

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 Global Configuration – ./app/etc

Magento Core team module file – ./app/code/core

Magento Community module file – ./app/code/community

Magento Local module file – ./app/code/local

Magento User Interface (layouts, templates) – ./app/design

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 – ./anytests

Magento other – ./

Where “./” mean the Magento root directory.

content

In the Path field, we should enter the path relative to the path specified in the Target field. In the Include and Ignore fields, you can enter a regular expression which will check the path with the file name only for the rows where the Type field is set to Recursive Dir. A file to be included in the extension package must match the expression specified in the Include field. If the file matches the expression in the Ignore field, it will not be included in the extension package correspondingly.

Saving Data and Creating a Package

When all data is correctly filled in, you can click the Save Data and Create Package button to save it in the package data file (Extension Package XML data file) and instantly create an extension file (Extension Package .tgz file).

Now the extension package file is ready for your Magneto site.

6. Load Local Package

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

I hope the tutorial was highly beneficial to everyone who read it. If you’ve any alternate coding method to resolve this issue which is simpler than this, add them via comments as it may help coders worldwide.

Realated Posts

2 thoughts on “How to Create an Extension Package File in Magento?

  1. Carlos Pravia

    I created a module with the help of the steps you have mentioned in this blog. But i got confused while entering the include field, then i realized that the file name must be same as the name given in the package.

Leave a Reply

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

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">