summaryrefslogtreecommitdiff
path: root/views/mailtemplates/html/order.phtml
blob: f134e2e6fdc27403121dfb9681fde5e80f089ff0 (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
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?php
	
	if ($this->getFrontendTaxView() === WPSG_BRUTTO) $display_brutto_netto = 'brutto';
	else $display_brutto_netto = 'netto';
	
?><div class="baskettable_wrap">
	<table class="baskettable" cellpadding="2" cellspacing="0" style="cell-padding:4px;">
		<tr class="head">
			<th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_pos"><?php echo __('Pos', 'wpsg'); ?></th>
			<th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo __('Produkt', 'wpsg'); ?></th>
			<th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_price"><?php echo __('Stückpreis', 'wpsg'); ?></th>
			<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; min-width:50px; width:50px; vertical-align:middle;" class="col_mwst"><?php echo __('MwSt.', 'wpsg'); ?></th>
			<?php } ?>
			<th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_amount"><?php echo __('Anzahl', 'wpsg'); ?></th>
			<th valign="middle" style="cell-padding:4px; padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo __('Summe', 'wpsg'); ?></th>		
		</tr>
		<?php $i = 0; foreach ((array)$this->view['basket']['produkte'] as $p) { $i ++; ?>
		<tr class="productrow <?php echo ((($i % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos td_bt"><?php echo $i; ?>.</td>
			<td style="padding:0px; vertical-align:middle;" class="col_name td_bt">
								
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td style="padding:0px; ">
							<?php if (wpsg_isSizedInt($this->get_option('wpsg_imagehandler_overviewimage'))) {

								if (isset($p['product_key'])) {
									$bild = $this->imagehandler->getAttachmentID($p['product_key']);
								} else {
									$arBilder = $this->imagehandler->getAttachmentIDs($this->getProduktId($p['id']));
									$bild = $arBilder[0];
								}
							?>
							<?php if (wpsg_isSizedString($bild)) { ?>  				
							<a style="width:50px; width:50px; margin-right:10px; float:left;" href="<?php echo $this->getProduktLink($this->getProduktId($p['id'])); ?>" title="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>">
								
								<?php echo wp_get_attachment_image($bild, Array(50, 50)); ?>
							</a>
							<?php } ?>
							<?php } ?>			
						</td>
						<td valign="middle" style="padding:4px; line-height:125%; vertical-align:middle; min-height:50px;">
							<a href="<?php echo $this->getProduktLink($this->getProduktId($p['id'])); ?>" title="<?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?>"><?php echo wpsg_hspc(((wpsg_isSizedString($p['detailname'])?$p['detailname']:$p['name']))); ?></a>
						</td>
					</tr>
				</table>
				
			</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price td_bt"><?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?></td>
			<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst td_bt"><?php echo wpsg_ff($p['mwst_value'], '%'); ?></td>
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount td_bt"><?php echo $p['menge']; ?></td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum td_bt"><?php echo wpsg_ff($p['preis'] * $p['menge'], $this->get_option('wpsg_currency')); ?></td>
		</tr>
		<tr class="productrow productrow2 <?php echo ((($i % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo __('Art. Nr.', 'wpsg'); ?>:</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
				<?php echo wpsg_hspc($p['anr']); ?>
			</td> 
		</tr>
		<?php $this->view['i'] = $i; $this->callMods('mail_row', array($i, $p)); ?>
		<?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
		<tr class="productrow productrow2 <?php echo ((($this->view['i'] % 2) == 0)?'productrow_odd':'productrow_even'); ?>">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo __('Mögliche Versandarten', 'wpsg'); ?>:</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_productvars_value">
				<?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
				<?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
				<?php } ?>
			</td>
		</tr>
		<?php } ?>
		<?php } ?>
		<?php if (wpsg_isSizedArray($this->view['basket']['arCalculation']['voucher'])) { $bLine = true; ?>		
			<?php foreach ($this->view['basket']['arCalculation']['voucher'] as $gs) { ?>
				<tr class="voucherrow">
					<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos"> </td>
					<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name"><?php echo wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $gs['code']); ?></td>
					<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price"><?php echo wpsg_ff($gs['set'], ((strpos($gs['set'], '%') !== false)?'%':$this->get_option('wpsg_currency'))); ?></td>
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
						<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst"><?php echo __('Anteilig', 'wpsg'); ?></td>
					<?php } ?>
					<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">1</td>
					<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($gs[$display_brutto_netto], $this->get_option('wpsg_currency')); ?></td>
				</tr>
			<?php } ?>
		<?php } ?>		
		<tr class="spacer">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="td_bt" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'6':'5'); ?>">&nbsp;</td>
		</tr>
	 	<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
	  <tr class="discountrow">
	    <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Abzüglich Rabatt', 'wpsg'); ?>:</td>
	    <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
	    <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">&nbsp;</td>		
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>
		</tr> 
		<?php } ?>
		<tr class="subtotalrow">
	    <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Zwischensumme', 'wpsg'); ?>:</td>
	    <td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
	    <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst"></td>		
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')); ?></td>
		</tr> 
		<tr class="shippingtotalrow">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Versandkosten', 'wpsg'); ?>:</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
			<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">
				<?php if (!wpsg_isSizedInt($this->arShipping[$this->view['basket']['checkout']['payment']]['mwst'])) { ?>
				<?php echo __('Anteilig', 'wpsg'); ?>
				<?php } else { ?>
				<?php echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '% '); ?>
				<?php } ?>
			</td>
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?></td>
		</tr>
		<?php if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) { ?>
		<?php foreach ($this->view['basket']['shipping']['methods'] as $shipping) { ?>
		<tr class="shippingtotalrow shippingsubrow">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_pos">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" colspan="2" class="col_name"><?php echo wpsg_hspc($this->getShippingName($shipping)); ?></td>
			<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">
				<?php if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { ?>
				<?php echo __('Anteilig', 'wpsg'); ?>
				<?php } else { ?>
				<?php echo wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); ?>
				<?php } ?>
			</td>			
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum">
				<?php if ($this->get_option('wpsg_preisangaben_frontend') == WPSG_NETTO) { ?>
				<?php echo wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_netto'], $this->get_option('wpsg_currency')); ?>
				<?php } else { ?>
				<?php echo wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')); ?>
				<?php } ?> 
			</td>
		</tr>
		<?php } ?>
		<?php } ?>
		<tr class="paymenttotalrow">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Zahlungskosten', 'wpsg'); ?>:</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
			<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst">
				<?php if (!wpsg_isSizedInt($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst'])) { ?>
				<?php echo __('Anteilig', 'wpsg'); ?>
				<?php } else { ?>
				<?php echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '% '); ?>
				<?php } ?>
			</td>
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?></td>
		</tr>
		<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
		<tr class="smallbuisnessrulerow">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') === '1')?'6':'5'); ?>">
				<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
			</td>
		</tr>	
		<?php } else { ?>
		<?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
		<tr class="taxrow">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
				<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
				<?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
				<?php } else { ?>
				<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
				<?php } ?>:
			</td>		
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><?php echo wpsg_ff($mwst['sum'], $this->get_option('wpsg_currency')); ?></td>
		</tr>
		<?php } ?>
		<?php } ?>
		<tr class="totalrow">
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_name" colspan="2"><?php echo __('Gesamtpreis', 'wpsg'); ?>:</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_price">&nbsp;</td>
			<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_mwst"></td>
			<?php } ?>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_amount">&nbsp;</td>
			<td style="padding:4px; line-height:100%; vertical-align:middle;" class="col_sum"><strong><?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?></strong></td>
		</tr>
		<?php $this->callMods('mail_order_end', [&$this->view['basket']['arCalculation'], true]); ?>	
	</table>
</div>
	
<br />