<div class="arrow_title">Bestellte Artikel</div>
<br />

<div style="width:100%;">
		<table cellpadding="3" cellspacing="1" border="0" class="shoppingcart">
			{if $shoppingcart.items}
				<tr style="font-weight:bold;">
					<td style="width:50px;text-align:center">Anzahl</td>
					<td>Beschreibung</td>
					<td style="width:200px;text-align:right;">St&uuml;ckpreis</td>
					<td style="width:200px;text-align:right;">Gesamtpreis</td>
				</tr>
				<tr><td colspan="4"><div class="seperator">&nbsp;</div></td></tr>
				{foreach item=Item from=$shoppingcart.items}
					<tr class="item_container">
						<td style="text-align:center;">
							{$Item->cartQuantity}
						</td>
						<td style="font-weight:bold;">
							<a style="color:#000000;font-size:14px;text-decoration:none;" href="./index.php?item_id={$Item->id}">
								{$Item->name}
							</a><br />
							{if $Item->cartVariant_1 || $Item->cartVariant_2}
								{$Item->cartVariant_1} {$Item->cartVariant_2}<br />
							{/if}
							{if ($Item->cartVariant_1 || $Item->cartVariant_2) && $Item->variant_data[$Item->cartVariant_1][$Item->cartVariant_2].item_number}
								<span style="font-weight:normal;color:#4B4B4B;">Art.-Nr. {$Item->variant_data[$Item->cartVariant_1][$Item->cartVariant_2].item_number}</span>
							{else}
								<span style="font-weight:normal;color:#4B4B4B;">Art.-Nr. {$Item->number}</span>
							{/if}
							
						</td>
						<td style="width:100px;text-align:right;font-size:13px;">
							{$Item->calculatedPrices.shownPrice|number_format:"2":",":"."} &euro;
						</td>
						<td style="color:black; width:100px;text-align:right;font-size:13px;font-weight:bold;">
							{$Item->calculatedPrices.shownPrice * $Item->quantity|number_format:"2":",":"."} &euro;
						</td>
					</tr>
					<tr><td colspan="5"><div class="seperator">&nbsp;</div></td></tr>
				{/foreach}
				
				<tr>
					<td colspan="3" style="text-align:right;">Summe aller Artikel</td>
					<td style="text-align:right;">{$shoppingcart.shown_price_sum|number_format:"2":",":"."} &euro;</td>
				</tr>
				
				<tr style="text-align:right;">
					{if $personal_data.payment_method}
						{assign var=usedPaymentMethod value=$payment_methods[$personal_data.payment_method]}
					{else}
						{assign var=usedPaymentMethod value=$payment_methods[$defaultPaymentMethod]}
					{/if}
					<td colspan="3">
						{if $usedPaymentMethod->accountType == '0'}
							zzgl. Zahlungsartenzuschlag
						{elseif $usedPaymentMethod->accountType == '1'}
							abzgl. Zahlungsartenabschlag
						{elseif $usedPaymentMethod->accountType == '2'}
							zzgl. Zahlungsartenzuschlag
						{elseif $usedPaymentMethod->accountType == '3'}
							abzgl. Zahlungsartenabschlag
						{/if}
					</td>
					<td>
						{$usedPaymentMethod->paymentAddShown|number_format:"2":",":"."} &euro;
					</td>
				</tr>
				
				<tr style="text-align:right;">
					{if $personal_data.shipping_method}
						{assign var=usedShippingMethod value=$deliverers[$personal_data.shipping_method]}
					{else}
						{assign var=usedShippingMethod value=$deliverers[$defaultDeliverer]}
					{/if}
					<td colspan="3">zzgl. Versandkostenpauschale</td>
					<td>
						{$usedShippingMethod->price_add_shown|number_format:"2":",":"."} &euro;
					</td>
				</tr>
								
				{foreach $shoppingcart.tax_values as $taxRate => $taxData}
					<tr>
						<td colspan="3" style="text-align:right;">
							{if $shoppingcartVATUsage}
								Darin enthaltene MwSt.
							{else}
								Zzgl. MwSt.
							{/if}
							{$taxRate} % 
						</td>
						<td style="text-align:right;">
							{$taxData['vat']|number_format:"2":",":"."} &euro;
						</td>
					</tr>
				{/foreach}
					
				{if $giftcertificatevalue}
					<tr>
						<td colspan="2">&nbsp;</td>
						<td style="color:#000000; width:100px;text-align:right;font-size:14px;font-weight:bold;">Zwischen Betrag</td>
						<td style="color:#000000; width:100px;text-align:right;font-size:14px;font-weight:bold;">
							{$shoppingcart.order_total|number_format:"2":",":"."} &euro;
						</td>
					</tr>
					
					<tr class="alright">	
						<input type="hidden" name="giftcertificate[has_gift_certificate]" value="yes" />
						
						<input type="hidden" name="giftcertificate[gift_certificat_code]" value="{$giftcode}" />
						
						<td colspan="3" style="text-align:right;">
							abzgl. Gutschein {$giftcode}
						</td>
						
						<td style="text-align:right;">
							- {$giftcertificatevalue|number_format:"2":",":"."} &euro;
						</td>
					</tr>
					{*
					{foreach $shoppingcart.tax_values as $taxRate => $taxData}
						<tr>
							<td colspan="3" style="text-align:right;">
								{$taxData['gift']['percent']|number_format:"2":",":"."} % davon mit {$taxRate} % MwSt.
							</td>
							<td class="alright">
								<!-- what do you want to show in an order that is without taxes -->
							</td>
						</tr>
					{/foreach}
					*}
					<tr>
						<td colspan="2">&nbsp;</td>
						<td style="color:#000000; width:100px;text-align:right;font-size:14px;font-weight:bold;">Zu zahlender Betrag</td>
						<td style="color:#000000; width:100px;text-align:right;font-size:14px;font-weight:bold;">
							{($shoppingcart.order_total - $giftcertificatevalue)|number_format:"2":",":"."} &euro;
						</td>
					</tr>
				{else}			
					<tr>
						<td colspan="2">&nbsp;</td>
						<td style="color:#000000; width:100px;text-align:right;font-size:14px;font-weight:bold;">Zu zahlender Betrag</td>
						<td style="color:#000000; width:100px;text-align:right;font-size:14px;font-weight:bold;">
							{$shoppingcart.order_total|number_format:"2":",":"."} &euro;
						</td>
					</tr>
					
					<tr>
						<td colspan="3" style="text-align:right;">
							{if $gftcertificateerrormessage}
								<label style="color:red;">{$gftcertificateerrormessage}</label>
							{else}
								<label>Gutschein</label>
							{/if}
							<input type="hidden" name="giftcertificate[has_gift_certificate]" id="has_gift_certificate" {if $giftcode}value="yes"{/if} />
							<input type="text" class="obligatory" name="giftcertificate[gift_certificat_code]" id="giftCertificateCodeFields" style="width:155px;color:#5C0069;background:#D4D4D4;border:1px solid #A8A8A8;" {if $giftcode}value="{$giftcode}"{/if} />
						</td>
						
						<td style="text-align:right;">
						</td>
					</tr>
				{/if}
			{else}
				<tr>
					<td colspan="4">Es befinden sich keine Artikel im Warenkorb!</td>
				</tr>
			{/if}
		</table>
</div>



<script type="text/javascript">
$(document).ready(function() {
	$('.remove_item').click(function(e) {
		e.preventDefault();
		
		$('.amountfield', $(this).parents('tr.item_container')).val(0);
		
		$('.refresh_button').trigger('click');
	});
});
</script>
