Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,97 @@
1
+<?php if (!empty($this->actions)) : ?>
2
+<form action="<?php echo $this->action; ?>" id="<?php echo $this->formId; ?>" method="post">
3
+    <div class="formbody">
4
+        <input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit; ?>">
5
+        <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
6
+        <?php endif; ?>
7
+
8
+        <?php if ($this->collection->hasErrors()) : ?>
9
+            <p class="error"><?php echo implode('</p><p class="error">', $this->collection->getErrors()); ?></p>
10
+        <?php endif; ?>
11
+
12
+        <div class="collection">
13
+
14
+
15
+            <?php foreach ($this->items as $item) : $i = 0; ?>
16
+                <div class="<?php echo $item['rowClass']; ?>"><?php if (!$this->isNotification) : ?>
17
+                    <div
18
+                    class="ms-0 col_<?php echo $i++; ?> col_first image"><?php echo $this->getGallery('images', $item['item'])->generateMainImage(); ?></div><?php endif; ?>
19
+                <div class="col_<?php echo $i++; ?><?php if ($this->isNotification) echo ' col_first'; ?> name">
20
+                    <?php if ($this->linkProducts && $item['href']) : ?><a
21
+                        href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a><?php else : ?><?php echo $item['name']; ?><?php endif; ?>
22
+                    <?php if (!empty($item['attributes']) || $item['sku']) : ?>
23
+                        <ul>
24
+                            <?php if ($item['sku']) : ?>
25
+                                <li class="attribute" itemprop="sku">
26
+                                <span class="label">Artikelnr.:</span> <?php echo $item['sku']; ?>
27
+                                </li><?php endif; ?>
28
+                            <?php foreach ($item['attributes'] as $name => $value) : ?>
29
+                                <li>
30
+                                    <strong>
31
+                                        <?= $this->attributeLabel($name) ?>:
32
+                                    </strong>
33
+                                    <?= $this->attributeValue($name, $value, ['html' => true, 'item' => $item['item']]) ?>
34
+                                </li>
35
+                            <?php endforeach; ?>
36
+                        </ul>
37
+                    <?php endif; ?>
38
+                </div>
39
+                <div class="col_<?php echo $i++; ?> quantity">
40
+                    <?php if ($this->isEditable) : ?>
41
+                        <input name="quantity[<?php echo $item['id']; ?>]" type="text" class="text form-control"
42
+                               value="<?php echo $item['quantity']; ?>" maxlength="10">
43
+                    <?php else : ?>
44
+                        <?php echo $item['quantity']; ?> x
45
+                    <?php endif; ?>
46
+                </div>
47
+                <div class="col_<?php echo $i++; ?> price">
48
+                    <?php echo $item['price']; ?>
49
+                </div>
50
+
51
+
52
+                <?php if ($this->total_tax_ids > 1) : ?>
53
+                    <div class="col_<?php echo $i++;
54
+                    if (!$this->isEditable) echo ' col_last'; ?> tax">
55
+                        <?php echo $item['tax_id']; ?>
56
+                    </div>
57
+                <?php endif;
58
+                if ($this->isEditable) : ?>
59
+
60
+
61
+
62
+
63
+                <div class="col_<?php echo $i++; ?> col_last actions w-auto me-0">
64
+
65
+                    <a href="<?= $item['cart_href'] ?>" data-bs-toggle="tooltip" title="In den Warenkorb legen" class="fs-24px add_to_cart"><i class="ico ico-einkaufswagen"></i></a>
66
+                    <a href="<?= $item['remove_href'] ?>" data-bs-toggle="tooltip" title="Aus Merkliste entfernen" class="remove fs-20px" title="<?= $item['remove_title'] ?>"><i class="far fa-trash-alt"></i></a>
67
+                    </div><?php endif; ?>
68
+
69
+                </div><?php if ($item['item']->hasErrors()) : ?>
70
+                    <div class="<?php echo $item['rowClass']; ?>">
71
+                        <div colspan="<?php echo $i; ?>">
72
+                            <p class="error"><?php echo implode('</p><p class="error">', $item['item']->getErrors()); ?></p>
73
+                        </div>
74
+                    </div>
75
+                <?php endif; ?>
76
+            <?php endforeach; ?>
77
+
78
+        </div>
79
+
80
+
81
+
82
+        <?php if (!empty($this->buttons)) : ?>
83
+    </div>
84
+    <div class=" text-end">
85
+        <?php //foreach($this->actions as $action) echo $action->generate($this->collection).' ';
86
+        ?>
87
+        <?php foreach ($this->buttons as $action) : ?>
88
+            <button type="<?php echo $action['type']; ?>"
89
+                    class="btn btn-outline-primary <?php echo $action['type']; ?> <?php echo $action['name']; ?>"
90
+                    name="<?php echo $action['name']; ?>"
91
+                    id="ctrl_<?php echo $action['name']; ?>_<?php echo $this->id; ?>" value="1"><i
92
+                        class="ico ico-einkaufswagen"></i><?php echo $action['label']; ?></button>
93
+        <?php endforeach; ?>
94
+    </div>
95
+    </form>
96
+<?php endif; ?>
97
+