-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.xml
27 lines (23 loc) · 1.09 KB
/
install.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
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name>Bypass-Free-Checkout-Opencart</name>
<version>1</version>
<author>W Z | Bravo Net Solution</author>
<code>Bypass-Free-Checkout-Opencart-Waziaq</code>
<file name="catalog/model/extension/total/total.php">
<operation error="skip">
<search position="before"><![CDATA[$total_data[] = array(]]></search>
<add><![CDATA[$this->session->data['carttotal'] = max(0, $total); ]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/payment_method.php">
<operation error="skip">
<search position="before" index="2"><![CDATA[foreach ($results as $result) {]]></search>
<add>
<![CDATA[if(isset($this->session->data['carttotal']) && $this->session->data['carttotal'] == 0){
foreach ($results as $key => $value) {if($value['code'] != "free_checkout") {unset($results[$key]);}}
$this->session->data['payment_method']['code'] = 'free_checkout';} ]]>
</add>
</operation>
</file>
</modification>