Magento is one of the leading open source eCommerce platforms for the SME segment. It has great features and functionalities that cater to most of the needs of the eCommerce industry. Even though different domains share the same basic features and functionalities, they need some customizations to cater to the individual needs of the customers/business in their domain.

These needs are satisfied through extensions which are changes in the core of Magento or they are extensions of the existing functionalities.

Once extensions are created they have to be packaged and submitted to Magento Connect for approval. Once approved, these extensions are published in Magento Connect.

In order to create a package, developers need Magento Extension Package file.

This blog provides a step-by-step procedure to create Magento extension package.

Steps to Create Magento Extension Package file
Step: 1

Login to your Magento admin panel.

Step: 2

In your Magento admin panel, navigate to System > Magento Connect > Package Extensions, this takes you to the Create Extension Package page, this page will look like below image…

Screen 1

This Create Extension Package consists of six sections:

  1. Package Info
  2. Release Info
  3. Authors
  4. Dependencies
  5. Contents
  6. Load Local Package 
1. Package Info

This section looks like the below image

Screen 2

In this,

Name: This field is mandatory. 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.

Note – The name used in this field will be your extension key. It is case-sensitive.

Channel: This field is mandatory.

If you are using Magento 1.5 or later to package, enter the channel as ‘community’

If you are using Magento 1.4 or prior to package, enter the channel as ‘connect.magentocommerce.com/community’

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

Supported Releases:  This field is mandatory.

If you are packaging an extension using a Magento Pre 1.5 (i.e. 1.4.x and lower) version and the extension only supports Pre 1.5 versions of Magento, use the following settings:

  • ·Supported Releases: Pre 1.5
  • ·Package file will save in <MAGENTO ROOT DIRECTORY>/var/pear/. Package will appear in PEAR format.

Note – If there is no <MAGENTO ROOT DIRECTORY>/var/pear folder then please create it before packaging your extension.

If you are packaging an extension using a Magento 1.5 and later version and the extension only supports 1.5 and later versions of Magento, use the following settings:

  • ·Supported releases: 1.5 & later
  • ·Package file will save in <MAGENTO ROOT DIRECTORY>/var/connect/.

Summary and Description: These fields are mandatory. Provide a brief summary and description about your extension.

License: This field is mandatory. Possible licenses as stated on the Magento community website is: OSL v3.0

License URL: This field is not mandatory. You can use this link http://opensource.org/licenses/osl-3.0.php

2. Release Info

This section looks like the below image

Screen 3

Release Version: This field is mandatory. 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. It is critical, however, to increment the release version number every time you update and repackage the extension. To protect against incorrect release version inputs, Magento Connect will not allow you to upload the same version twice.

Release Stability: This field is not mandatory. Release stability can be set to Alpha, Beta, and Stable. By default, Magento Connect users are only allowed to install Stable release extensions.

Notes: This field is mandatory. We can add notes about this release.

3. Authors

This section looks like the below image

Screen 4

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 is used to display your extensions on Magento Connect.

4. Dependencies

   This section looks like the below image

Screen 5

 

It is used to specify the dependencies of our code in regard to the PHP version. We can enter minimum PHP version as 5.0.0 and maximum PHP version as 6.0.0

5. Contents

This section looks like the below image

Screen 6

This is the most important section to create extension package. Here we should select specific ‘Target’ option from the drop down and enter the appropriate folder path for that option.

For example, if our module local file is in app/code/local, then we should select ‘Magento Local module file’ option in the Target dropdown and give the module name in the Path field.

See below the list of target options…

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

After all the file paths are specified, click Save Data and Create the Package. This will save it in a package data file and create a package file. Now you can see your created package file in ROOT_DIRECTORY/var/connect/ folder.

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

6. Load Local Package

This section looks like the below image

Screen 7

Here we can see the saved and created package data.

Hope the blog helped you to create a Magento Extension Package File.

References

https://www.apptha.com/blog/how-to-create-an-extension-package-file-in-magento/

How to Create Magento Extension Package File?

Be the first to Know

Subscribe to our blog to get the latest articles directly to your inbox.

READY TO DRIVE SALES?

Request a Quote Today

Request a Quote

Leave a Reply

Be the First to Comment!