Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zero foundation enters the secondary development of magento

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

This is the zero basis to enter the magento secondary development https://www.ciandt.com.cn/magento best documents, hematemesis recommended, 80% of these documents are their own practice and development inevitably sorted out some mistakes, welcome to help point out.

1. Determine the naming of namespaces (Namespace) and modules (Modulename)

two。 Under the app/etc/modules/ path, create a Namespace_Modulename.xml file and tell the Magento system which modules have been added

3. Under the app/code/local/ path, create the [Namespace] folder and create its subfolder-- [Modulename] folder

4. Under the app/code/local/ [Namespace] / [Modulename] / path, create a folder such as Block,controllers,etc,Helper,Model,sql

4.1 under the app/code/local/ [Namespace] / [Modulename] / Block/ path, create [Modulename] .php files and Adminhtml folders

4.1.1 create [Modulename] .php files and [Modulename] folders under the app/code/local/ [Namespace] / [Modulename] / Block/Adminhtml/ path

4.1.2 create Grid.php files, Edit.php files, and Edit folders under the app/code/local/ [Namespace] / [Modulename] / Block/Adminhtml/ [Modulename] / path

4.1.3 create Tabs.php files, Form.php files, and Tab folders under the app/code/local/ [Namespace] / [Modulename] / Block/Adminhtml/ [Modulename] / Edit/ path

4.1.4 create a Form.php file under the app/code/local/ [Namespace] / [Modulename] / Block/Adminhtml/ [Modulename] / Edit/Tab/ path

4.2 create a config.xml file under the app/code/local/ [Namespace] / [Modulename] / etc/ path

4.3 create an Adminhtml folder under the app/code/local/ [Namespace] / [Modulename] / controllers/ path

4.3.1 create a [Modulename] Controller.php file under the app/code/local/ [Namespace] / [Modulename] / controllers/Adminhtml/ path

4.4 create a Data.php file under the app/code/local/ [Namespace] / [Modulename] / Helper/ path

4.5 create [Modulename] .php files, Status.php files, and Mysql4 folders under the app/code/local/ [Namespace] / [Modulename] / Model/ path

4.5.1 create [Modulename] .php file and [Modulename] folder under the app/code/local/ [Namespace] / [Modulename] / Model/Mysql4/ path

4.5.2 create a Collection.php file under the app/code/local/ [namespace] / [Modulename] / Model/Mysql4/ [Modulename] / path

4.6 create the [modulename] _ setup folder under the app/code/local/ [Namespace] / [Modulename] / sql/ path

4.6.1 create a mysql-install- [Moduleversion] .php file under the path app/code/local/ [Namespace] / [Modulename] / sql / [modulename] _ setup/, which can automatically add new tables (Table) to the database of the Magento system

5. Under the app/design/adminhtml/default/default/layout/ path, create the [modulename] .xml file

PS: this mode is the simplest, and you can add more complex functions as needed.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report