我們在使用 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
二 背景 擴充功能-> 支付管理 進行安裝
三 可以在前台 使用者的支付 方式顯示 該定義的支付方式