magento插件开发,Mobilnik银行支付插件

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/模块名)

转载于:https://my.oschina.net/u/2370328/blog/617240

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值