天天看点

opencart 添加支付方式

我们在使用 opencart  时,需要对接一个新的本网站的支付方式,在网上找半天没有完整的,所以记录一下自己的心得

一 先创建9个文件 ,其中的具体内容可复制同目录的 cod 文件 ,文件内部的 所有 包含  "cod"  文字全部替换成 "custom" ,并注意大小写

1、  创建admin/controller/payment/custom.php

2、 创建admin/language/english/payment/custom.php

3、 创建admin/language/zh-CN/payment/custom.php

4、 创建 catalog\controller\payment/custom.php

5、 创建 catalog\language\english\payment/custom.php

6、 创建 catalog\language\zh-CN\payment/custom.php    //注该页面的text_title 需自行定义

7、 创建 catalog\model\payment/custom.php

8、 创建 catalog\view\theme\default\template\payment/custom.php

9、 创建 admin/view/template/payment/custom.tpl

 二  后台 扩展功能-> 支付管理 进行安装

三  可以在前台 用户的支付 方式显示 该定义的支付方式