dvms create extension package magento

9

Click here to load reader

Upload: dvms

Post on 28-Oct-2014

45 views

Category:

Documents


0 download

DESCRIPTION

TÀI LIỆU HƯỚNG DẪN ĐÓNG GÓI MODULE MAGENTO 1.7THÔNG TIN LIÊN HỆ HỖ TRỢDVMS (08) 360 289 37 [email protected] www.DVMS.vn

TRANSCRIPT

Page 1: DVMS Create Extension Package Magento

TÀI LIỆU HƯỚNG DẪN ĐÓNG GÓI MODULE

MAGENTO 1.7

Tài liệu kỹ thuật

07/2012

Page 2: DVMS Create Extension Package Magento

Trang 2 /9

Lịch sử chỉnh sửa

Ngày tháng Version Mô tả Người viết

07/2012 1.7 Nguyễn Văn Linh

Page 3: DVMS Create Extension Package Magento

Trang 3 /9

Tôi có module bloghome có cấu trúc như sau:

Những files và folders của module:

File app/design/adminhtml/default/default/layout/bloghome_blog.xml : layout giao diện admin

Folder app/design/adminhtml/default/default/template/bloghome : chứa toàn bộ template admin của module. File app/design/frontend/base/default/layout/bloghome_blog.xml: layout frontend của module.

Folder app/design/frontend/base/default/template/bloghome: toàn bộ templates frontend của module.

File app/etc/modules/Bloghome_Blog.xml: activation file.

File app/locale/en_US/Bloghome_Blog.csv và de_DE/Bloghome_Blog.csv : là hai file ngôn ngữ của module

Tiến hành đóng gói

Vào admin => Configuration => Magento Connect > Package Extensions. Tại đây có một số tab để đóng gói (

Create Extension Package page):

Package Info

Release Info

Authors Dependencies

Contents

1. Package Info

Name: tên gói, đặt tên theo gói module Channel : community.

Supported releases: nếu chọn “Pre-1.5.0.0” thì gói sẽ được đóng gói vào: var/pear/folder. Chọn “ 1.5.0.0 &

later" gói sẽ được tạo trong var/connect/. Bạn có thể chọn cả hai loại.

Summary and Description: mô tả

Page 4: DVMS Create Extension Package Magento

Trang 4 /9

License: Thông tin bản quyền, có một số loại bản quyền sau

o * GNU General Public License (GPL) o * GNU Lesser General Public License (LGPL)

o * Open Software License (OSL)

o * Mozilla Public License (MPL)

o * BSD License o * Apache Software License

o * MIT License

o * Academic Free License (AFL) o * Bản quyền của bạn (commercial)

License URI : ví dụ: http://opensource.org/licenses/osl-3.0.php

2. Release Info

Thông tin về phiên bản

Page 5: DVMS Create Extension Package Magento

Trang 5 /9

3. Authors

Thông tin tài khoản user

Page 6: DVMS Create Extension Package Magento

Trang 6 /9

4. Dependencies

Thông tin về php và các thư viện mở rộng đặc biệt kèm theo.

Page 7: DVMS Create Extension Package Magento

Trang 7 /9

5. Contents

- khai báo thông tin module mà bạn muốn đóng gói, đường dẫn tương ứng như sau:

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 - ./ là source tại thư mục gốc cảu site

Ở đây cho phép bạn chọn kiểu là file hoặc toàn bộ forder (Recursive Dir )

Page 8: DVMS Create Extension Package Magento

Trang 8 /9

Sau khi chọn xong source module của bạn thì bạn chọn nút: “Saving Data and Creating Package”

Khi đó toàn bộ module của bạn đã được tạo thành một file nén (.tgz) và file .xml trong thư mục tương ứng với

phiên bản bạn chọn.

Trong file .xml sẽ chứa mã key để bạn upload lên http://magentocommerce.com. Còn nếu bạn cài đặt từ file

nén thì không cần quan tâm tới file .xml này.

Tham khảo thêm:

http://www.magentocommerce.com/wiki/7_-

_magento_connect/creating_magento_connect_extension_package

http://www.magentocommerce.com/wiki/7_-_magento_connect/packaging_a_magento_extension

Page 9: DVMS Create Extension Package Magento

Trang 9 /9

CHÚC THÀNH CÔNG!

THÔNG TIN LIÊN HỆ HỖ TRỢ

DVMS

(08) 360 289 37 [email protected]

www.DVMS.vn