summaryrefslogtreecommitdiff
path: root/views/warenkorb/overview.phtml
blob: 4599ab39909a21a51a54feb179aa5091c88d72df (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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<?php

	/**
	 * Template für die Zusammenfassung der Bestellung
	 * Anzeige vor dem Abschluß einer Bestellung
	 */

	//wpsg_debug($this->view['basket']);
 
?>
<div class="wpsg wpsg_overview">

	<?php echo $this->writeFrontendMessage(); ?>

	<?php $GLOBALS['step'] = 4; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>

	<form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">

		<h2><?php echo __('Zusammenfassung', 'wpsg'); ?></h2>
		
		<div class="wpsg_spacer"></div>
		
		<?php if (!$this->hasMod('wpsg_mod_ordercondition')) { ?>
		<div class="wpsg_agb">
			<label>
				<input type="checkbox" value="1" name="wpsg[agb]" />
				<?php echo wpsg_translate(__('Ich habe die #1# des Anbieters gelesen und erkläre mit dem Absenden der Bestellung mein Einverständnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'), 
					'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_AGB).'">'.__('AGB', 'wpsg').'</a>', 
					'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_WIDERRUF).'">'.__('Widerrufsbelehrung', 'wpsg').'</a>'); 
				?>
			</label>
		</div> 
		<?php } ?>
		
		<?php $this->callMods('overview_top', array(&$this->view['basket'])); ?>
				
		<div class="shippayment">
			<div class="subtitle"><?php echo __('Zahlung/Versand', 'wpsg'); ?>&nbsp;
				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT2)); ?></span>
			</div>
			<div class="payment"><?php echo wpsg_hspc($this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?></div>
			<div class="shipping"><?php echo wpsg_hspc($this->arShipping[$this->view['basket']['checkout']['shipping']]['name']); ?></div>
		</div>
		
		<?php if (wpsg_getStr($this->view['basket']['checkout']['diff_shippingadress']) == '1') { ?>
		<div class="anschrift">
			<div class="subtitle"><?php echo __('Rechnungsanschrift', 'wpsg'); ?>&nbsp;
				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
			</div>
			<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>			
			<?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?><br />
			<?php } ?>
			<?php echo wpsg_hspc(($this->view['basket']['checkout']['title'] != '' && $this->view['basket']['checkout']['title'] != '-1')?$this->view['basket']['checkout']['title']:''); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['vname']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['name']); ?><br />
			<?php echo wpsg_hspc($this->view['basket']['checkout']['strasse']); ?><br />
			<?php echo wpsg_hspc($this->view['basket']['checkout']['plz']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['ort']); ?><br />
			<?php if (wpsg_isSizedArray($this->view['basket']['land'])) { ?>
			<?php echo wpsg_hspc($this->view['basket']['land']['name']); ?>
			<?php } ?>					
		</div>		
		<div class="wpsg_clear"></div><br />
					
		<div class="anschrift">
			<div class="subtitle"><?php echo __('Lieferanschrift', 'wpsg'); ?>&nbsp;
				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
			</div>
			<?php if (trim($this->view['basket']['checkout']['shipping_firma']) != '') { ?>			
			<?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_firma']); ?><br />
			<?php } ?>
			<?php echo (($this->view['basket']['checkout']['shipping_title'] != '' && $this->view['basket']['checkout']['shipping_title'] != '-1')?$this->view['basket']['checkout']['shipping_title']:''); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_name']); ?><br />
			<?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_strasse']); ?><br />
			<?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_ort']); ?><br />
			<?php if (wpsg_isSizedArray($this->view['basket']['shipping_land'])) { ?>
			<?php echo wpsg_hspc($this->view['basket']['shipping_land']['name']); ?>
			<?php } ?>		
		</div>		
		<div class="wpsg_clear"></div><br />
		
		<?php } else { ?>
					
		<div class="anschrift">
			<div class="subtitle"><?php echo __('Liefer- und Rechnungsanschrift', 'wpsg'); ?>&nbsp;
				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
			</div>
			<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>			
			<?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?><br />
			<?php } ?>
			<?php echo wpsg_hspc(($this->view['basket']['checkout']['title'] != '' && $this->view['basket']['checkout']['title'] != '-1')?$this->view['basket']['checkout']['title']:''); ?> <?php echo $this->view['basket']['checkout']['vname']; ?> <?php echo $this->view['basket']['checkout']['name']; ?><br />
			<?php echo wpsg_hspc($this->view['basket']['checkout']['strasse']); ?><br />
			<?php echo wpsg_hspc($this->view['basket']['checkout']['plz']); ?> <?php echo wpsg_hspc($this->view['basket']['checkout']['ort']); ?><br />
			<?php if (wpsg_isSizedArray($this->view['basket']['land'])) { ?>
			<?php echo wpsg_hspc($this->view['basket']['land']['name']); ?>
			<?php } ?>							
		</div>		
		<div class="wpsg_clear"></div><br />
		<?php } ?>
		
		<?php if (wpsg_isSizedString($this->view['basket']['checkout']['ustidnr'])) { ?>
		<?php echo __('UStIdNr.', 'wpsg'); ?>: <?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?><br /><br />
		<?php } ?>
	
		<div class="subtitle">
			<?php echo __('Bestellte Produkte', 'wpsg'); ?>&nbsp;
			<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_BASKET)); ?></span>
		</div>
		
		<div class="wpsg_table_wrap">
			<table class="wpsg_produkte">
				<tr class="wpsg_kopf">
					<th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>					
					<th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
					<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
					<?php } ?>
					<th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
				</tr>
				<?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
				<?php $strOverviewRow = ''; ob_start(); $this->callMods('overview_row', array(&$p, $i)); $strOverviewRow = ob_get_contents(); ob_end_clean(); ?>
				<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
					<td class="wpsg_cell_menge" rowspan="<?php echo 2 + substr_count($strOverviewRow, '<tr'); ?>">
						<?php echo wpsg_hspc($p['menge']); ?>			
					</td>					
					<td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
					<td class="wpsg_cell_mwst"><?php echo wpsg_ff($p['mwst_value']); ?> %</td>				
					<?php } ?>
					<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
				</tr>
				<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_name">
						<?php if ($this->get_option('wpsg_mod_produktbilder_overviewimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) { 
							
							if (wpsg_isSizedString($p['varianten_image'])) $arBilder = array($p['varianten_image']);						
							else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->getProduktID($p['id'])));  
							
						?>
						<div class="wpsg_overview_productimage">
							<img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->getProduktID($p['id']), $arBilder[0], 30, 30, 'c')); ?>" alt="<?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>" />
						</div>
						<?php } ?>
						<?php if ($this->getProduktLink($p)) { ?>
						<a href="<?php echo $this->getProduktLink($p); ?>"><?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?></a>
						<?php } else { ?>
						<?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>
						<?php } ?>	
					</td>
				</tr>
				<?php echo $strOverviewRow; ?>
				<?php } ?>
				<?php  if (isset($this->view['basket']['gs'])) { ?>
				<tr class="wpsg_row_gutschein"> 
					<td class="wpsg_cell_menge" rowspan="2">1</td>					
					<td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
					<td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
					<?php } ?>
					<td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
				</tr>
				<tr class="wpsg_row_gutschein">				
					<td class="wpsg_cell_name" colspan="<?php echo $this->view['colspan']; ?>"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
				</tr>
				<?php } ?>
				<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
				<tr class="wpsg_row_discount">
					<td class="wpsg_cell_menge" rowspan="2"></td>					
					<td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>					
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
					<td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
					<?php } ?>
					<td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>
				</tr>
				<tr class="wpsg_row_discount">
					<td class="wpsg_cell_name" colspan="<?php echo $this->view['colspan']; ?>"><?php echo __('Rabatt', 'wpsg'); ?></td>
				</tr>
				<?php } ?>
				<tr class="wpsg_row_summe">
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
						<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
							<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
						<?php } else { ?>					
							<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
							<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
							<?php } else { ?>
							<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
							<?php } ?>
						<?php } ?>
					</td>
					<td class="wpsg_cell_summe_value">
						<?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
					</td>
				</tr>	
				<?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
				<tr class="wpsg_row_shipping">
					<td colspan="2" class="wpsg_cell_shipping_label">
						<?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a> (#2#)', 'wpsg'),
							$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN),
							$this->arShipping[$this->view['basket']['checkout']['shipping']]['name']
						); ?>:								
					</td>
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>										
					<td class="wpsg_cell_mwst">
					<?php if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true) { ?>
					<?php echo __('anteilig', 'wpsg'); ?>
					<?php } else { ?>
					<?php echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%'); ?>
					<?php } ?>
					</td>					
					<?php } ?>
					<td class="wpsg_cell_shipping_value">
						<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
					</td>
				</tr>
				<?php } ?>
				<?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
				<tr class="wpsg_row_payment">
					<td colspan="2" class="wpsg_cell_payment_label">
						<?php echo wpsg_translate(__('Zahlungsart (#1#)', 'wpsg'), $this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?>:
					</td>
					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
					<td class="wpsg_cell_mwst">
					<?php if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true) { ?>
					<?php echo __('anteilig', 'wpsg'); ?>
					<?php } else { ?>
					<?php echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%'); ?>
					<?php } ?>
					</td>
					<?php } ?>
					<td class="wpsg_cell_payment_value">
						<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>
					</td>
				</tr>
				<?php } ?>		
				
				<?php if ($this->get_option("wpsg_kleinunternehmer") == "1") { ?>
				<tr class="wpsg_basket_kleinunternehmer">	
					<td colspan="<?php echo $this->view['colspan'] + 1; ?>"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></td>
				</tr>		
				<tr class="wpsg_row_gesamt">
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
						<?php echo __('Gesamtpreis', 'wpsg'); ?>:
					</td>
					<td class="wpsg_cell_gesamt_value">
						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
					</td>
				</tr>					
				<?php } else { ?>		
				<tr class="wpsg_row_gesamt">
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
						<?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:
					</td>
					<td class="wpsg_cell_gesamt_value">
						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
					</td>
				</tr>	
				<?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
				<tr class="wpsg_row_mwst">
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
						<?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
					</td>
					<td class="wpsg_cell_mwst_value">
						<?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
					</td>
				</tr>
				<?php } ?>	
				<tr class="wpsg_row_gesamt_brutto wpsg_row_small">
					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
						<?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:
					</td>
					<td class="wpsg_cell_gesamt_value">
						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
					</td>
				</tr>
				<?php } ?>
				
				<?php $this->callMods('overview_row_end', array(&$this->view)); ?>
			
			</table>
			
			<div class="wpsg_versandhinweis"><?php echo __('Sofern die Lieferung in das Nicht-EU-Ausland erfolgt, können weitere Zölle, Steuern oder Gebühren vom Kunden zu zahlen sein, jedoch nicht an den Anbieter, sondern an die dort zuständigen Zoll- bzw. Steuerbehörden. Dem Kunden wird empfohlen, die Einzelheiten vor der Bestellung bei den Zoll- bzw. Steuerbehörden zu erfragen.', 'wpsg'); ?></div>
		</div>
		
		<br />
		
		<?php if ($this->view['basket']['checkout']['comment'] != '') { ?>
			<div class="subtitle">
				<?php echo __('Bestellkommentar', 'wpsg'); ?>&nbsp;
				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ändern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
			</div>
			<div class="wpsg_ordercomment">
				<?php echo $this->view['basket']['checkout']['comment'] ?>
			</div>
		<?php }?>				
		
				
		<?php $this->callMods('overview_inner_prebutton', array(&$this->view)); ?>
				
		<div class="wpsg_clear"></div>
				
		<br />
				
		<input type="submit" class="wpsg_button wpsg_checkoutbutton" value="<?php echo __('zurück', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
		<input type="submit" class="wpsg_button wpsg_orderbutton" value="<?php echo __('zahlungspflichtig bestellen', 'wpsg'); ?>" name="wpsg_order" />
		
		<div class="wpsg_clear"></div>
		
	</form>		

</div>