-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.xml
executable file
·55 lines (54 loc) · 2.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
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
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Moduł wysyłki Inpost Paczkomaty</name>
<version>1.2.2</version>
<code>inpost</code>
<author>[email protected]</author>
<link>https://avatec.pl</link>
<file name="catalog/controller/checkout/checkout.php">
<operation>
<search index="0"><![CDATA[// Required by klarna]]></search>
<add position="before"><![CDATA[$this->document->addScript('catalog/view/javascript/inpost.min.js');
]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/shipping_method.php">
<operation>
<search index="1"><![CDATA['title' => $quote['title'],]]></search>
<add position="after"><![CDATA[
'type' => (empty( $quote['type'] ) ? 'radio' : $quote['type']),
]]></add>
</operation>
</file>
<file name="catalog/view/theme/default/template/checkout/shipping_method.twig">
<operation>
<search index="1" ><![CDATA[<p><strong>{{ shipping_method.title }}</strong></p>]]></search>
<add position="after"><![CDATA[
{% if shipping_method.type == "radio" %}
]]></add>
</operation>
<operation>
<search index="1"><![CDATA[<div class="alert alert-danger alert-dismissible">{{ shipping_method.error }}</div>
{% endif %}]]></search>
<add position="after"><![CDATA[
{% else %}
{% if not shipping_method.error %}
<div class="select">
<select name="shipping_method" class="form-control">
{% for quote in shipping_method.quote %}
{% if quote.code == code or not code %}
{% set code = quote.code %}
<option value="{{ quote.code }}" selected>{{ quote.title }} - {{ quote.text }}</option>
{% else %}
<option value="{{ quote.code }}">{{ quote.title }} - {{ quote.text }}</option>
{% endif %}
{% endfor %}
</select>
{% else %}
<div class="alert alert-danger alert-dismissible">{{ shipping_method.error }}</div>
{% endif %}
{% endif %}
]]></add>
</operation>
</file>
</modification>