-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.ocmod.xml
executable file
·65 lines (65 loc) · 3.29 KB
/
install.ocmod.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>فروتل - ثبت سفارشات</name>
<code>frotel_register_order</code>
<version>1.0</version>
<author>ReZa ZaRe ([email protected])</author>
<link>https://github.com/Reza1607</link>
<file path="catalog/controller/checkout/checkout.php">
<operation>
<search><![CDATA[$products = $this->cart->getProducts();]]></search>
<add position="before"><![CDATA[
if (!isset($this->session->data['province_id'])) {
$this->response->redirect($this->url->link('extension/payment/frotel/city'));
}
]]></add>
</operation>
</file>
<file error="skip" path="catalog/controller/quickcheckout/checkout.php">
<operation>
<search><![CDATA[$products = $this->cart->getProducts();]]></search>
<add position="before"><![CDATA[
if (!isset($this->session->data['province_id'])) {
$this->response->redirect($this->url->link('extension/payment/frotel/city'));
}
]]></add>
</operation>
</file>
<file path="catalog/model/checkout/order.php">
<operation>
<search><![CDATA[$order_query = $this->db->query("SELECT *, (SELECT os.name FROM `" . DB_PREFIX . "order_status` os WHERE os.order_status_id = o.order_status_id AND os.language_id = o.language_id) AS order_status FROM `" . DB_PREFIX . "order` o WHERE o.order_id = '" . (int)$order_id . "'");]]></search>
<add position="replace"><![CDATA[$order_query = $this->db->query("SELECT *, (SELECT os.name FROM `" . DB_PREFIX . "order_status` os WHERE os.order_status_id = o.order_status_id AND os.language_id = o.language_id) AS order_status,f.frotel_factor,f.last_change_status,f.province,f.city FROM `" . DB_PREFIX . "order` o LEFT JOIN `".DB_PREFIX."frotel_factor` AS f ON o.order_id=f.oc_order_id WHERE o.order_id = '" . (int)$order_id . "'");]]></add>
</operation>
<operation>
<search><![CDATA['invoice_no' => $order_query->row['invoice_no'],]]></search>
<add position="before"><![CDATA[
'frotel_factor' => $order_query->row['frotel_factor'],
'last_change_status' => $order_query->row['last_change_status'],
'province' => $order_query->row['province'],
'city' => $order_query->row['city'],
]]></add>
</operation>
</file>
<file path="catalog/controller/checkout/success.php">
<operation>
<search><![CDATA[$data['heading_title'] = $this->language->get('heading_title');]]></search>
<add position="before"><![CDATA[
$message = '';
if(isset($this->session->data['pay_verify'])) {
$message .= '<div class="alert alert-success">'.$this->session->data['pay_verify'].'</div><br />';
$this->session->data['pay_verify'] = null;
}
if(isset($this->session->data['pay_error'])) {
$message .= '<div class="alert alert-danger">'.$this->session->data['pay_error'].'</div><br />';
$this->session->data['pay_error'] = null;
}
]]></add>
</operation>
<operation>
<search><![CDATA[$data['button_continue'] = $this->language->get('button_continue');]]></search>
<add position="before"><![CDATA[
$data['text_message'] = $message . $data['text_message'];
]]></add>
</operation>
</file>
</modification>