Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c3e1549
Showing
36 changed files
with
4,520 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<modification> | ||
<id>ECPay Logistic</id> | ||
<version>1.0.0131</version> | ||
<vqmver>2.X</vqmver> | ||
<author>ECPay</author> | ||
<file name="catalog/view/theme/*/template/checkout/shipping_method.tpl"> | ||
<operation info="shipping info"> | ||
<search position="top"><![CDATA[ | ||
<p><strong><?php echo $text_comments; ?></strong></p> | ||
]]></search> | ||
<add><![CDATA[ | ||
<?php include_once("catalog/controller/shipping/ecpaylogistic_input.php");?> | ||
]]></add> | ||
</operation> | ||
</file> | ||
<file name="catalog/view/theme/*/template/checkout/payment_method.tpl"> | ||
<operation info="shipping info"> | ||
<search position="top"><![CDATA[ | ||
<p><strong><?php echo $text_comments; ?></strong></p> | ||
]]></search> | ||
<add><![CDATA[ | ||
<?php include_once("catalog/controller/payment/ecpaylogistic_payment.php");?> | ||
]]></add> | ||
</operation> | ||
</file> | ||
<file name="catalog/controller/checkout/confirm.php"> | ||
<operation info="shipping info"> | ||
<search position="before"><![CDATA[ | ||
$this->session->data['order_id'] = $this->model_checkout_order->addOrder($order_data); | ||
]]></search> | ||
<add><![CDATA[ | ||
include_once("catalog/controller/shipping/ecpaylogistic_save.php"); | ||
]]></add> | ||
</operation> | ||
</file> | ||
<file name="admin/controller/sale/order.php"> | ||
<operation info="shipping info" error="skip"> | ||
<search position="before"><![CDATA[ | ||
$this->response->setOutput($this->load->view('sale/order_info.tpl', $data)); | ||
]]></search> | ||
<add><![CDATA[ | ||
include_once("controller/sale/ecpaylogistic_order.php"); | ||
]]></add> | ||
</operation> | ||
</file> | ||
<file name="admin/controller/sale/order.php"> | ||
<operation info="shipping info" error="skip"> | ||
<search position="before"><![CDATA[ | ||
$this->response->setOutput($this->load->view('sale/order_info', $data)); | ||
]]></search> | ||
<add><![CDATA[ | ||
include_once("controller/sale/ecpaylogistic_order.php"); | ||
]]></add> | ||
</operation> | ||
</file> | ||
<file name="catalog/controller/account/order.php"> | ||
<operation info="shipping info" error="skip"> | ||
<search position="before"><![CDATA[ | ||
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/order_info.tpl')) { | ||
]]></search> | ||
<add><![CDATA[ | ||
include_once("catalog/controller/account/ecpaylogistic_order.php"); | ||
]]></add> | ||
</operation> | ||
</file> | ||
<file name="catalog/controller/account/order.php"> | ||
<operation info="shipping info" error="skip"> | ||
<search position="before"><![CDATA[ | ||
$this->response->setOutput($this->load->view('account/order_info', $data)); | ||
]]></search> | ||
<add><![CDATA[ | ||
include_once("catalog/controller/account/ecpaylogistic_order.php"); | ||
]]></add> | ||
</operation> | ||
</file> | ||
</modification> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 綠界科技 全方位(All In One)物流整合介接 OpenCart2.0 購物車版 | ||
--- | ||
|
||
## 1. 介紹 | ||
|
||
- 綠界科技超商取貨付款外掛套件,提供合作特店以及個人會員使用開放原始碼商店系統時,無須自行處理複雜的檢核,直接透過安裝設定外掛套件,便可快速介接綠界科技物流整合系統,使用方便快速的商品運送機制。 | ||
|
||
|
||
|
||
## 2. 支援版本 | ||
- OpenCart Version 2.1.0.2 | ||
- OpenCart Version 2.2.0.0 | ||
|
||
|
||
## 3. 注意事項 | ||
- 外掛套件僅支援 UTF8 語系版本的PHP商店系統。 | ||
```css | ||
|
||
- '.因購物車架構使用FB及LINE等APP內建瀏覽器無法選取門市,請使用行動裝置內建的瀏覽器操作。' | ||
``` | ||
|
||
|
||
## 4. 聯絡我們 | ||
- 綠界技術客服信箱: techsupport@greenworld.com.tw | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
class ControllerPaymentecpayLogistic extends Controller | ||
{ | ||
private $error = array(); | ||
|
||
public function index() | ||
{ | ||
$this->response->redirect($this->url->link('shipping/ecpaylogistic', 'token=' . $this->session->data['token'], 'SSL')); | ||
} | ||
|
||
private function validate() | ||
{ | ||
return true; | ||
} | ||
|
||
public function install() | ||
{ | ||
$this->model_extension_extension->install('shipping', 'ecpaylogistic'); | ||
$this->load->model('user/user_group'); | ||
if (method_exists($this->user,"getGroupId")) { | ||
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'payment/ecpaylogistic'); | ||
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'payment/ecpaylogistic'); | ||
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'shipping/ecpaylogistic'); | ||
$this->model_user_user_group->addPermission($this->user->getGroupId(), 'modify', 'shipping/ecpaylogistic'); | ||
} | ||
include_once("controller/shipping/ecpaylogistic.inc.php"); | ||
$sFieldName = 'code'; | ||
if (!ecpay_column_exists($this->db, DB_PREFIX."setting", 'code')) { | ||
$sFieldName = 'group'; | ||
} | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_unimart_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_fami_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_fami_collection_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_hilife_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_hilife_collection_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_unimart_collection_status' , `value` = '0';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_order_status' , `value` = '1';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_mid' , `value` = '2000933';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_hashkey' , `value` = 'XBERn1YOvpM9nfZc';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_hashiv' , `value` = 'h1ONHk4P4yqbl5LK';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_type' , `value` = 'C2C';"); | ||
$this->db->query("INSERT INTO `" . DB_PREFIX . "setting` SET `store_id` = 0 , `" . $sFieldName . "` = 'ecpaylogistic' , `key` = 'ecpaylogistic_sender_name' , `value` = '綠界科技';"); | ||
$this->db->query(" | ||
CREATE TABLE IF NOT EXISTS `ecpaylogistic_info` ( | ||
`order_id` INT(11) NOT NULL, | ||
`AllPayLogisticsID` VARCHAR(50) NOT NULL, | ||
KEY `order_id` (`order_id`) | ||
) DEFAULT COLLATE=utf8_general_ci;"); | ||
} | ||
|
||
public function uninstall() | ||
{ | ||
$this->model_extension_extension->uninstall('shipping', 'ecpaylogistic'); | ||
$this->load->model('user/user_group'); | ||
if (method_exists($this->user,"getGroupId")) { | ||
$this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'payment/ecpaylogistic'); | ||
$this->model_user_user_group->removePermission($this->user->getGroupId(), 'modify', 'payment/ecpaylogistic'); | ||
$this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'shipping/ecpaylogistic'); | ||
$this->model_user_user_group->removePermission($this->user->getGroupId(), 'modify', 'shipping/ecpaylogistic'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
if (strpos($order_info['shipping_code'],"ecpaylogistic.") !== false) { | ||
$CreateShippingOrder = $this->url->link('shipping/ecpaylogistic/create_shipping_order&order_id='.$data['order_id'], 'token=' . $this->session->data['token'], 'SSL'); | ||
$WindowOpenCmd = "window.open('" . $CreateShippingOrder . "','ecpayLogistic',config='width=800,height=600,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no');"; | ||
$ShowCVSMap = $this->url->link('shipping/ecpaylogistic/show_cvs_map_by_order&order_id='.$data['order_id'], 'token=' . $this->session->data['token'], 'SSL'); | ||
$ShowMapCmd = "window.open('" . $ShowCVSMap . "','ecpayLogistic',config='width=1024,height=600,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no');"; | ||
$ecpaylogistic_query = $this->db->query("Select * from ecpaylogistic_info where order_id=".$data['order_id']); | ||
if (!$ecpaylogistic_query->num_rows) { | ||
if (isset($data['shipping_address_1'])) { | ||
$data['shipping_address_1'] .= " " . '<input type="button" id="ecpaylogistic_store" class="btn btn-primary btn-xs" value="變更門市" onClick="javascript:' . $ShowMapCmd .'"/>'; | ||
} else { | ||
$data['shipping_address'] .= "<br>" . '<input type="button" id="ecpaylogistic_store" class="btn btn-primary btn-xs" value="變更門市" onClick="javascript:' . $ShowMapCmd .'"/>'; | ||
} | ||
$data['shipping_method'] .= " " . '<input type="button" id="ecpaylogistic" class="btn btn-primary btn-xs" value="建立物流訂單" onClick="javascript:' . $WindowOpenCmd .'"/>'; | ||
} | ||
} | ||
?> |
Oops, something went wrong.