OPENCART插件2.1.0改到2.3.0.2版-要改多少地方

———————————–
#OPENCART 插件 2.1.0 改到 2.3.0.2版 要改多少地方 你以為很少-其實很多 最少要3-4工作天
2.3.0.2版 => 3.0 那就 更花工時了 因為差異也很大

2017/11/10修改紀錄
以下不含前台程式光後台程式要改的差異
———————————–
1.類別名稱
class ControllerPaymentCheque extends Controller {
class ControllerExtensionPaymentCheque extends Controller {
————————————————————————————–
2.語言檔位置
$this->load->language(‘payment/ezship’);
$this->load->language(‘extension/payment/ezship’);
————————————————————————————–
3.樣板檔位置
$this->response->setOutput($this->load->view($this->module_path.’.tpl’, $this->data));
$this->response->setOutput($this->load->view(‘extension/payment/cheque’, $data));
$this->response->setOutput($this->load->view($this->module_path.’.tpl’, $this->data));
————————————————————————————–
$this->response->setOutput($this->load->view(‘shipping/ezship_shipment.tpl’, $data));
$this->response->setOutput($this->load->view(‘extension/shipping/ezship_shipment’, $data));
————————————————————————————–
4.權限檢查名稱
if (!$this->user->hasPermission(‘modify’, ‘shipping/ezship_shipment’)) {
if (!$this->user->hasPermission(‘modify’, ‘extension/shipping/ezship_shipment’)) {
5.連結位置
public function __construct( $registry ) {
parent::__construct( $registry );
$this->ssl = (defined(‘VERSION’) && version_compare(VERSION,’2.2.0.0′,’>=’)) ? true : ‘SSL’;
}
————————————————————————————–
6.存檔後返回頁
$this->response->redirect($this->url->link(‘extension/payment’, ‘token=’ . $this->session->data[‘token’], ‘SSL’));

可以改成類別頁
$this->response->redirect($this->url->link(‘extension/extension’, ‘token=’ . $this->session->data[‘token’] . ‘&type=shipping’, $this->ssl));//存檔後返回頁-預設是到類別頁
或是本頁
$this->response->redirect($this->url->link(‘extension/shipping/ezship_shipment’, ‘token=’ . $this->session->data[‘token’], $this->ssl));
————————————————————————————–
//存檔按鈕
$data[‘action’] = $this->url->link(‘payment/ezship’, ‘token=’ . $this->session->data[‘token’], ‘SSL’);
//取消按鈕
$data[‘cancel’] = $this->url->link(‘extension/payment’, ‘token=’ . $this->session->data[‘token’], ‘SSL’);
//存檔按鈕
$data[‘action’] = $this->url->link(‘extension/payment/ezship’, ‘token=’ . $this->session->data[‘token’], $this->ssl);
//取消按鈕
$data[‘cancel’] = $this->url->link(‘extension/extension’, ‘token=’ . $this->session->data[‘token’] . ‘&type=payment’, $this->ssl);

———————————–
#語言圖標修正
———————————–
c:\Users\suffi\Desktop\超商取貨付款插件\admin\view\template\extension\payment\ezship.tpl

/.png”
原版寫法

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *