-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
class MasteringMagento_Example_Helper_Data extends Mage_Core_Helper_Abstract { | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE config> | ||
<!-- | ||
/** | ||
MasteringMagento = namespace | ||
Example = module name | ||
*/ | ||
--> | ||
<config> | ||
<modules> | ||
<MasteringMagento_Example> | ||
<version>0.0.0</version> | ||
</MasteringMagento_Example> | ||
</modules> | ||
<global> | ||
<models> | ||
<example> | ||
<class>MasteringMagento_Example_Model</class> | ||
</example> | ||
</models> | ||
<blocks> | ||
<example> | ||
<class>MasteringMagento_Example_Block</class> | ||
</example> | ||
</blocks> | ||
<helpers> | ||
<example> | ||
<class>MasteringMagento_Example_Helper</class> | ||
</example> | ||
</helpers> | ||
</global> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" ?> | ||
<!DOCTYPE config> | ||
<!-- | ||
active = whether it's active | ||
codePool = what folder to look in under app/code | ||
depends = dependencies from Magento | ||
--> | ||
<config> | ||
<modules> | ||
<MasteringMagento_Example> | ||
<active>true</active> | ||
<codePool>local</codePool> | ||
<depends /> | ||
</MasteringMagento_Example> | ||
</modules> | ||
</config> |
1503a03
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.6. Recap: Creating a Module
Folder Structure
The folder structure is
app/code/local/<NameSpace>/<Module>
. It consists ofBlock
,etc
,Model
,controllers
, andHelper
.Configuration
The configuration files necessary to load the module into Magento are
app/code/local/<NameSpace>/<Module>/etc/config.xml
andapp/etc/modules/<NameSpace>_<Module>.xml
.