magento插件开发,Mobilnik银行支付插件
2016-02-18 00:00
162 查看
摘要: 通过学习了解magento插件机制及流程
0、在app/etc/modules下声明配置local中的Ym_hello 的模块
<?xml version="1.0"?>
<config>
<modules>
<Ym_hello >
<active>true</active>
<codePool>local</codePool>
</Ym_hello>
</modules>
</config>
1、app/code/local/下建个文件夹为包名(Ym)记得大写哦
2、app/code/local/包名/下建个文件夹为模块名(hello)
3、在模块下面建以下目录统一插件扩展目录包名下面可建立多个模块
app/code/local/包名/模块名/Block
app/code/local/Ym/hello/controllers
app/code/local/Ym/hello/etc
app/code/local/Ym/hello/Helper
app/code/local/Ym/hello/Model
app/code/local/Ym/hello/sql
4、在app/code/local/包名/模块名/etc下添加config.xml文件
<?xml version="1.0"?>
<config>
<modules>
<Ym_hello>
<version>0.1.0</version>
</Ym_hello>
</modules>
<frontend>
<routers>
<hello>
<use>index</use>
<args>
<module>Ym_hello</module>
<frontName>hell</frontName>
</args>
</hello>
</routers>
</frontend>
<config>
5、(先删除var/cache缓存)在后台检查是否可以看到插件模块已经显示,无显示则失败
6,在app/code/local/包名/模块名/controllers建立控制器
class Ym_hello_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction(){
echo 'Hello magento';
}
}
测试访问地址:http://域名/模块名(www.magento.com/模块名)
0、在app/etc/modules下声明配置local中的Ym_hello 的模块
<?xml version="1.0"?>
<config>
<modules>
<Ym_hello >
<active>true</active>
<codePool>local</codePool>
</Ym_hello>
</modules>
</config>
1、app/code/local/下建个文件夹为包名(Ym)记得大写哦
2、app/code/local/包名/下建个文件夹为模块名(hello)
3、在模块下面建以下目录统一插件扩展目录包名下面可建立多个模块
app/code/local/包名/模块名/Block
app/code/local/Ym/hello/controllers
app/code/local/Ym/hello/etc
app/code/local/Ym/hello/Helper
app/code/local/Ym/hello/Model
app/code/local/Ym/hello/sql
4、在app/code/local/包名/模块名/etc下添加config.xml文件
<?xml version="1.0"?>
<config>
<modules>
<Ym_hello>
<version>0.1.0</version>
</Ym_hello>
</modules>
<frontend>
<routers>
<hello>
<use>index</use>
<args>
<module>Ym_hello</module>
<frontName>hell</frontName>
</args>
</hello>
</routers>
</frontend>
<config>
5、(先删除var/cache缓存)在后台检查是否可以看到插件模块已经显示,无显示则失败
6,在app/code/local/包名/模块名/controllers建立控制器
class Ym_hello_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction(){
echo 'Hello magento';
}
}
测试访问地址:http://域名/模块名(www.magento.com/模块名)
相关文章推荐
- 如何修改Liferay的Session过期时间
- Oracle SQL 性能健康检查脚本 (SQLHC) (文档 ID 1626277.1)
- TQ210开发板安装QT交叉编译环境安装总结(转)
- Java多线程参考资料
- 通达OA助力老挝金木棉集团
- hive-1.2.1 hbase-1.1.3 整合
- 每天工作四个小时--个人版本1.0
- 会声会影录制画外音教程
- 会声会影如何使用覆叠滤镜
- 会声会影提取伴奏乐教程
- 会声会影剪切合并歌曲教程
- 会声会影制作视频翻页转场教程
- 会声会影如何渲染高清视频
- ecmaScript5新特性
- iOS 判断当前是否有网络
- cell点击折叠和展开
- TabBar图标和字体颜色
- 飞机实时动态查询接口代码调用服务
- jQuery文本框表情插件
- Spring配置多个properties的方式