1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,143 @@ |
1 |
+<?php if ($this->textOnly): ?> |
|
2 |
+<?php ### THIS IS FOR TEXT ONLY EMAILS ### ?> |
|
3 |
+<?php foreach ($this->items as $item ): ?> |
|
4 |
+<?= $item['name'] ?><?php if (!empty($item['attributes'])): ?> (<?php $i=0; foreach ($item['attributes'] as $name => $value): ?><?= ($i++==0 ? '' : ', ').$this->attributeLabel($name) ?>: <?= $this->attributeValue($name, $value) ?><?php endforeach; ?>)<?php endif; ?>: <?= $item['quantity'] ?> x <?= $item['price'] ?> = <?= $item['total'] ?> |
|
5 |
+ |
|
6 |
+<?php endforeach; ?> |
|
7 |
+-------------------- |
|
8 |
+<?= $GLOBALS['TL_LANG']['MSC']['subTotalLabel'] ?>: <?= $this->subtotal ?> |
|
9 |
+ |
|
10 |
+<?php foreach ($this->surcharges as $surcharge): ?> |
|
11 |
+<?= $surcharge['label'] ?>: <?= $surcharge['price'] ?> = <?= $surcharge['total_price'] ?> |
|
12 |
+ |
|
13 |
+<?php endforeach; ?> |
|
14 |
+<?= $GLOBALS['TL_LANG']['MSC']['grandTotalLabel'] ?>: <?= $this->total ?> |
|
15 |
+<?php else: ?> |
|
16 |
+<?php ### THIS IS HTML EMAILS AND EVERYTHING ELSE ### ?> |
|
17 |
+<?php if(!empty($this->actions)): ?> |
|
18 |
+<form id="<?= $this->formId ?>" method="post"> |
|
19 |
+<div class="formbody"> |
|
20 |
+<input type="hidden" name="FORM_SUBMIT" value="<?= $this->formSubmit ?>"> |
|
21 |
+<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}"> |
|
22 |
+<?php endif; ?> |
|
23 |
+ |
|
24 |
+<?php if ($this->collection->hasErrors()): ?> |
|
25 |
+<p class="error"><?= implode('</p><p class="error">', $this->collection->getErrors()) ?></p> |
|
26 |
+<?php endif; ?> |
|
27 |
+ |
|
28 |
+<table class="productTable"> |
|
29 |
+<tbody> |
|
30 |
+<?php foreach($this->items as $item): $i=0; ?> |
|
31 |
+ <tr class="<?= $item['rowClass'] ?>"><?php if(!$this->isNotification): ?> |
|
32 |
+ <td class="col_<?= $i++ ?> col_first image"><?= $this->getGallery('images', $item['item'])->generateMainImage() ?></td><?php endif; ?> |
|
33 |
+ <td class="col_<?= $i++ ?><?php if($this->isNotification) echo ' col_first'; ?> name"> |
|
34 |
+ <?php if($this->linkProducts && $item['href']): ?> |
|
35 |
+ <a href="<?php echo $item['href']; ?>"> |
|
36 |
+ <?php endif; ?> |
|
37 |
+ |
|
38 |
+ <strong> |
|
39 |
+ <?php echo $item['name']; ?> |
|
40 |
+ <?= ($item['product']->zusatz ? '{{iso_custom_product::zusatz:'.$item['product']->id.'}}' : '') ?> |
|
41 |
+ <?= ($item['product']->jahrgang ? $item['product']->jahrgang : '') ?> |
|
42 |
+ </strong> |
|
43 |
+ |
|
44 |
+ <?php if($this->linkProducts && $item['href']): ?> |
|
45 |
+ </a> |
|
46 |
+ <?php endif; ?> |
|
47 |
+ |
|
48 |
+ <?php if ($item['product']->qualitaet || $item['product']->geschmack || $item['product']->flascheninhalt): ?> |
|
49 |
+ <br /> |
|
50 |
+ <?= ($item['product']->qualitaet ? '{{iso_custom_product::qualitaet:'.$item['product']->id.'}}' : '') ?> |
|
51 |
+ <?= ($item['product']->geschmack ? '{{iso_custom_product::geschmack:'.$item['product']->id.'}}' : '') ?> |
|
52 |
+ <?= rtrim(rtrim(\System::getFormattedNumber($item['product']->flascheninhalt,3),'0'),',') ?> l |
|
53 |
+ <?php endif; ?> |
|
54 |
+ <?php if ($item['product']->weinlinie): ?> |
|
55 |
+ <br /><span class="small">{{isolabel::attr_weinlinie}}: {{iso_custom_product::weinlinie:<?= $item['product']->id ?>}}</span> |
|
56 |
+ <?php endif; ?> |
|
57 |
+ <?php if ($item['sku']): ?><br /><span class="small" itemprop="sku"><span class="label">{{isolabel::attr_sku}}:</span> <?php echo $item['sku']; ?></span><?php endif; ?> |
|
58 |
+ <ul> |
|
59 |
+ <?php if(!empty($item['attributes'])): ?> |
|
60 |
+ <?php foreach($item['attributes'] as $name => $value): ?> |
|
61 |
+ <li><strong><?= $this->attributeLabel($name) ?>:</strong> <?= $this->attributeValue($name, $value, ['html'=>true, 'item'=>$item['item']]) ?></li> |
|
62 |
+ <?php endforeach; ?> |
|
63 |
+ <?php endif; ?> |
|
64 |
+ </ul> |
|
65 |
+ </td> |
|
66 |
+ <td class="col_<?= $i++ ?> quantity"> |
|
67 |
+ <?php if($this->isEditable): ?> |
|
68 |
+ <input name="quantity[<?= $item['id'] ?>]" type="text" class="text" value="<?= $item['quantity'] ?>" maxlength="10"> |
|
69 |
+ <?php else: ?> |
|
70 |
+ <?= $item['quantity'] ?> x |
|
71 |
+ <?php endif; ?> |
|
72 |
+ </td> |
|
73 |
+ <td class="col_<?= $i++ ?> price"><?= $item['price'] ?></td> |
|
74 |
+ <td class="col_<?= $i++; if(!$this->isEditable && $this->total_tax_ids < 2) echo ' col_last' ?> price total"><?= $item['total'] ?></td><?php if ($this->total_tax_ids > 1): ?> |
|
75 |
+ <td class="col_<?= $i++; if(!$this->isEditable) echo ' col_last' ?> tax"><?= $item['tax_id'] ?></td><?php endif; if($this->isEditable): ?> |
|
76 |
+ <td class="col_<?= $i++ ?> col_last actions"> |
|
77 |
+ <?php if ($item['edit_href'] ?? null): ?><a href="<?= $item['edit_href'] ?>" class="edit" title="<?= $item['edit_title'] ?>"><?= $item['edit_link'] ?></a><?php endif; ?> |
|
78 |
+ <a href="<?= $item['remove_href'] ?>" class="remove" title="<?= $item['remove_title'] ?>"><?= $item['remove_link'] ?></a> |
|
79 |
+ </td><?php endif; ?> |
|
80 |
+ </tr><?php if($item['item']->hasErrors()): ?> |
|
81 |
+ <tr class="<?= $item['rowClass'] ?>"> |
|
82 |
+ <td colspan="<?= $i ?>"><p class="error"><?= implode('</p><p class="error">', $item['item']->getErrors()) ?></p></td> |
|
83 |
+ </tr> |
|
84 |
+<?php endif; ?> |
|
85 |
+<?php endforeach; ?> |
|
86 |
+</tbody> |
|
87 |
+<?php |
|
88 |
+// we know this is invalid markup but nor Outlook nor TCPDF support putting <thead> or <tfoot> in front of <tbody> |
|
89 |
+// you're free to adjust the template to your needs |
|
90 |
+?> |
|
91 |
+<tfoot> |
|
92 |
+ <tr class="foot_0 foot_first subtotal"> |
|
93 |
+ <?php $i=0; if(!$this->isNotification): ?> |
|
94 |
+ <td class="col_<?= $i++ ?> col_first"> </td><?php endif; ?> |
|
95 |
+ <td class="col_<?= $i++; $i++ ?><?php if($this->isNotification) echo ' col_first'; ?> name" colspan="2"><?= $GLOBALS['TL_LANG']['MSC']['subTotalLabel'] ?></td> |
|
96 |
+ <td class="col_<?= $i++ ?> price"> </td> |
|
97 |
+ <td class="col_<?= $i++; if(!$this->isEditable && $this->total_tax_ids < 2) echo ' col_last' ?> price total"><?= $this->subtotal ?></td><?php if ($this->total_tax_ids > 1): ?> |
|
98 |
+ <td class="col_<?= $i++; if(!$this->isEditable) echo ' col_last' ?> tax"> </td><?php endif; if($this->isEditable): ?> |
|
99 |
+ <td class="col_<?= $i++ ?> col_last remove"> </td><?php endif; ?> |
|
100 |
+ </tr> |
|
101 |
+ <?php foreach ($this->surcharges as $surcharge): $i=0; ?> |
|
102 |
+ <tr class="<?= $surcharge['rowClass'] ?>"> |
|
103 |
+ <?php if(!$this->isNotification): ?> |
|
104 |
+ <td class="col_<?= $i++ ?> col_first"> </td><?php endif; ?> |
|
105 |
+ <td class="col_<?= $i++; $i++ ?><?php if($this->isNotification) echo ' col_first'; ?> name" colspan="2"><?= $surcharge['label'] ?></td> |
|
106 |
+ <td class="col_<?= $i++ ?> price"><?= $surcharge['price'] ?></td> |
|
107 |
+ <td class="col_<?= $i++; if(!$this->isEditable && $this->total_tax_ids < 2) echo ' col_last' ?> price total"><?= $surcharge['total_price'] ?></td><?php if ($this->total_tax_ids > 1): ?> |
|
108 |
+ <td class="col_<?= $i++; if(!$this->isEditable) echo ' col_last' ?> tax"><?= $surcharge['tax_id'] ?></td><?php endif; if($this->isEditable): ?> |
|
109 |
+ <td class="col_<?= $i++ ?> col_last remove"> </td><?php endif; ?> |
|
110 |
+ </tr> |
|
111 |
+ <?php endforeach; ?> |
|
112 |
+ <tr class="foot_<?= count($this->surcharges)+1 ?> foot_last total"> |
|
113 |
+ <?php $i=0; if(!$this->isNotification): ?> |
|
114 |
+ <td class="col_<?= $i++ ?> col_first"> </td><?php endif; ?> |
|
115 |
+ <td class="col_<?= $i++; $i++ ?><?php if($this->isNotification) echo ' col_first' ?> name" colspan="2"><?= $GLOBALS['TL_LANG']['MSC']['grandTotalLabel'] ?></td> |
|
116 |
+ <td class="col_<?= $i++ ?> price"> </td> |
|
117 |
+ <td class="col_<?= $i++; if(!$this->isEditable && $this->total_tax_ids < 2) echo ' col_last' ?> price total"><?= $this->total ?></td><?php if ($this->total_tax_ids > 1): ?> |
|
118 |
+ <td class="col_<?= $i++; if(!$this->isEditable) echo ' col_last' ?> tax"> </td><?php endif; if($this->isEditable): ?> |
|
119 |
+ <td class="col_<?= $i++ ?> col_last remove"> </td><?php endif; ?> |
|
120 |
+ </tr> |
|
121 |
+</tfoot> |
|
122 |
+</table> |
|
123 |
+ |
|
124 |
+<?php if(!empty($this->actions)): ?> |
|
125 |
+</div> |
|
126 |
+<div class="submit_container"> |
|
127 |
+<?php foreach($this->actions as $action) echo $action->generate($this->collection) . ' iso_collection_table.html5'; ?> |
|
128 |
+</div> |
|
129 |
+</form> |
|
130 |
+<?php endif; ?> |
|
131 |
+ |
|
132 |
+<?php if (!$this->isEditable && !empty($this->downloads) && \is_array($this->downloads)): ?> |
|
133 |
+<div class="downloads"> |
|
134 |
+<h2><?= $GLOBALS['TL_LANG']['MSC']['downloadsLabel'] ?></h2> |
|
135 |
+<ul> |
|
136 |
+<?php foreach ($this->downloads as $download): ?> |
|
137 |
+<li class="<?= $download['downloadable'] ? 'available' : 'unavailable' ?>"><?php if ($download['downloadable'] && $download['href']): ?><a href="<?= $download['href'] ?>"><?php endif; echo $download['title']; if ($download['downloadable'] && $download['href']): ?></a><?php endif; echo $download['remaining']; ?></li> |
|
138 |
+<?php endforeach; ?> |
|
139 |
+</ul> |
|
140 |
+</div> |
|
141 |
+<?php endif; ?> |
|
142 |
+ |
|
143 |
+<?php endif; ?> |