Subversion Repositories wpShopGermany4

Rev

Rev 7938 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1996 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Übersichtsseite der Bestellungen im Frontend
5
	 */
6
 
5237 daniel 7
	//wpsg_debug($this->view['arOrder']);
5082 roger 8
 
1996 daniel 9
?>
10
 
3444 daniel 11
<div class="wpsg_mod_kundenverwaltung_order wpsg">
1996 daniel 12
 
13
	<?php echo $this->writeFrontendMessage(); ?>
14
 
15
	<?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
16
		<?php foreach ($this->view['arOrder'] as $order) { ?>
2583 david 17
 
2989 daniel 18
		<div class="wpsg_box">
3444 daniel 19
 
20
		<h2><?php echo wpsg_translate(__('Bestellung vom #1# über #2#', 'wpsg'), date('d.m.Y', strtotime($order['cdate'])), wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency'))); ?></h2>
21
 
2989 daniel 22
			<div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
2308 daniel 23
				<strong><?php echo __('Bestellstatus', 'wpsg'); ?>:</strong>&nbsp;
24
					<?php echo $this->arStatus[$order['status']]; ?>
8214 daniel 25
					<?php if ($this->hasMod('wpsg_mod_rechnungen')) {
26
 
27
                        $arInvoice = \wpsg\wpsg_invoice::findByOrderId(intval($order['id']));
28
 
29
                        ?>
30
 
31
                        <?php foreach ($arInvoice as $oInvoice) { ?>
32
 
33
                            <?php if ($oInvoice->isInvoice()) { ?>
34
 
35
                                <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
36
 
37
                            <?php } else if ($oInvoice->isStorno()) { ?>
38
 
39
                                <a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
40
 
41
                            <?php } ?>
42
 
43
                        <?php } ?>
44
 
2308 daniel 45
					<?php } ?>
46
				<br />
47
				<strong><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</strong> <?php echo wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency')); ?><br />
48
				<strong><?php echo __('Bestellte Produkte', 'wpsg'); ?>:</strong>
3444 daniel 49
 
2308 daniel 50
				<table class="wpsg_mod_kundenverwaltung_producttable">
51
					<tr>
2497 daniel 52
						<th class="col_name"><?php echo __('Name', 'wpsg'); ?></th>
53
						<th class="col_price"><?php echo __('Preis', 'wpsg'); ?></th>
2308 daniel 54
					</tr>
2583 david 55
					<?php foreach ((array)$order['arProdukte'] as $p) { ?>
2308 daniel 56
					<tr>
57
						<td class="col_name">
5237 daniel 58
							<a href="<?php echo $p['url']; ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
2308 daniel 59
							<br /><?php echo __('Artikelnummer', 'wpsg'); ?>: <?php echo $p['anr']; ?>
6165 hartmut 60
							<?php if ($this->hasMod('wpsg_mod_productvariants') && wpsg_isSizedString($p['mod_vp_varkey'])) { $arVarInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['mod_vp_varkey'])); ?>
2308 daniel 61
							<br /><?php echo __('Variante', 'wpsg'); ?>: <?php echo $arVarInfo['key']; ?>
2343 daniel 62
							<?php } ?>
63
							<?php if ($this->hasMod('wpsg_mod_downloadplus')) { ?>
64
							<?php if ($this->callMod('wpsg_mod_downloadplus', 'isPDFProdukt', array($p['id'])) === true) { $arDownloads = $this->callMod('wpsg_mod_downloadplus', 'getIndivFiles', array($p['id'], $order['id'])); ?>
65
							<?php foreach ((array)$arDownloads as $d) { ?>
66
							<br /><?php echo wpsg_translate(__('Datei "#1#": ', 'wpsg'), ((strlen($d['file_out']) > 0)?$d['file_out']:$d['file'])); ?>
67
							<?php if ($d['status'] == '0') { ?>
68
							<?php echo __('Noch nicht geplant', 'wpsg'); ?>
69
							<?php } else if ($d['status'] == '1') { ?>
70
							<?php echo wpsg_translate(__('Geplant am #1#.', 'wpsg'), date('d.m.Y', strtotime($d['scheduled']))); ?>
71
							<?php } else if ($d['status'] == '2') {  ?>
72
							<?php $strURL = site_url().'?wpsg_action=wpsg_mod_downloadplus_download&hash='.$d['hash'].'&indi='.$d['indiv_id']; ?>
73
							<?php echo wpsg_translate(__('<a href="#1#" target="blank">Download</a>', 'wpsg'), $strURL); ?>
74
							<?php } ?>
75
							<?php } ?>
76
							<?php } ?>
2583 david 77
							<?php } ?>
3709 daniel 78
							<br />
4912 daniel 79
							<?php if ($this->hasMod('wpsg_mod_productvars')) { $arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($order['id'], $p['product_index'])); ?>
3709 daniel 80
							<?php if (wpsg_isSizedArray($arPV)) { ?>
81
							<?php foreach ($arPV as $pv) { ?>
82
							<?php echo wpsg_hspc($pv['name']); ?>: <?php echo wpsg_hspc($pv['value']); ?>
2583 david 83
							<?php } ?>
3709 daniel 84
							<?php } ?>
2583 david 85
							<?php } ?>
2308 daniel 86
						</td>
87
						<td class="col_price">
3654 daniel 88
							<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
2308 daniel 89
							<?php echo wpsg_ff($p['preis_netto'], $this->get_option('wpsg_currency')); ?>
90
							<?php } else { ?>
91
							<?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
92
							<?php } ?>
93
						</td>
94
					</tr>
95
					<?php } ?>
96
				</table>
3444 daniel 97
 
1996 daniel 98
			</div>
2989 daniel 99
		</div>
100
 
1996 daniel 101
		<?php } ?>
7938 daniel 102
	<?php } else { ?>
5238 daniel 103
	<p><?php echo __('Bisher keine Bestellungen durchgeführt.', 'wpsg'); ?></p>
1996 daniel 104
	<?php } ?>
105
 
106
</div>