summaryrefslogtreecommitdiff
path: root/views/mods/mod_ordercondition/overview_top.phtml
blob: 13ba816aabfb19147d6ba65e8b165b0bfb6b10a8 (plain)
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
<?php

	/**
	 * Template für die Integration der Bestellbedingungen in die Bestellzusammenfassung
	 * @version 4.6.1
	 */

	// Die Mindestlänge, damit der Text in einer Scrollbox angezeigt wird
	$minLength = 1000;

	// Bereits akzeptierte Bestellbedingungen, z.B. nach der Rückkehr von PayPal
	$arAccepted = $this->getAcceptedConditions($this->view['basket']??null);

?>
<?php foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { ?>
<div class="wpsg_agb" id="wpsg_agb_<?php echo $oc['id']; ?>">
	<label>
		<input type="checkbox" value="1" name="wpsg_mod_ordercondition[<?php echo $oc['id']; ?>]" required <?php echo ((in_array(strval($oc['id']), $arAccepted['ordercondition'], true))?'checked="checked"':''); ?> />
		<?php if (strlen($oc['text']) < $minLength) { ?>
		<?php echo $oc['text']; ?>
		<?php } else { ?>
		<?php echo __($oc['name'], 'wpsg'); ?>
		<?php } ?>
	</label>
	<?php if (strlen($oc['text']) >= $minLength) { ?>
	<div class="wpsg_mod_ordercondition_hint"><?php echo $oc['text']; ?></div>
	<?php } ?>
</div>
<?php } ?>