<{if $order}>

	<div class="text-right">
		Ordre ID: <{$order->getWebshopOrderId()}>

		<{if $order->getInvoiceId()}>
			<br/>Fakturanummer: <{$order->getInvoiceId()}>
		<{/if}>
	</div>

	<h3 class="headline">Din ordre</h3><span class="line margin-bottom-25"></span><div class="clearfix"></div>

	<{if $order->getStatus() == "new"}>

		<div class="alert alert-warning">Din ordre er ikke behandlet endnu.</div>

	<{elseif $order->getStatus() == "cancelled"}>

		<div class="alert alert-danger">Din ordre er annulleret.</div>

	<{elseif $order->getStatus() == "sent"}>

		<div class="alert alert-success">Din ordre er afsendt.</div>

		<{if $order->getTrackingNumbers()}>
			<p>
				<{assign var="shipping" value=$order->getShipping()}>
				<{assign var="tracking_numbers" value=$order->getTrackingNumbers()}>

				<strong><{t}>Følg din ordre hos<{/t}> <{$shipping->getName()|escape}>:</strong>

				<{section name="k" loop=$tracking_numbers}>
					<{if $shipping && $shipping->getTrackingUrl()}>
						<a href="<{$shipping->getTrackingUrl($tracking_numbers[k])|escape}>" target="_blank"><{$tracking_numbers[k]|escape}></a><{if !$smarty.section.k.last}>,<{/if}>
					<{else}>
						<{$tracking_numbers[k]|escape}><{if !$smarty.section.k.last}>,<{/if}>
					<{/if}>
				<{/section}>
			</p>
		<{/if}>

	<{/if}>

	<div class="my-4">
		<{if !$order->getIsPaid()}>
			<a class="button color margin-left-0" href="<{$order->getPaymentUrl()|escape}>">Betal ordren</a>
		<{/if}>

		<a href="#small-dialog" class="popup-with-zoom-anim button color margin-left-0">Har du spørgsmål til din ordre?</a>
	</div>

	<div id="small-dialog" class="zoom-anim-dialog mfp-hide">
		<h3 class="headline">Spørgsmål</h3><span class="line margin-bottom-25"></span><div class="clearfix"></div>

		<form id="add-comment" class="add-comment" method="post">
			<input type="hidden" name="subject" value="Spørgsmål ang. ordre <{$order->getWebshopOrderId()|escape}>"/>
			<input type="hidden" name="order_url" value="<{$order->getPublicUrl()|escape}>"/>

			<fieldset>
				<p>Skriv dit spørgsmål her, og vi vender tilbage hurtigst muligt pr. mail:</p>

				<div>
					<label>Dit navn:</label>
					<input type="text" name="name" value="<{$order->getOrderName()|escape}>" size="50"/>
				</div>

				<div>
					<label>Din e-mail-adresse: <span>*</span></label>
					<input type="text" name="from" value="<{$order->getEmail()|escape}>" size="50" required/>
				</div>

				<div>
					<label>Dit spørgsmål: <span>*</span></label>
					<textarea cols="40" rows="3" name="question" required></textarea>
				</div>

			</fieldset>

			<input type="submit" value="Send" class="button color" id="send_button"/>
			<div class="clearfix"></div>

		</form>
	</div>

	<div class="row justify-content-center">
		<div class="col-10 col-md-12">
			<h3 class="headline">Produkter</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
		</div>
	</div>

	<{assign var="products" value=$order->getOrderProducts()}>

	<table class="cart-table responsive-table">

		<tr>
			<th>Produkt</th>
			<th>Antal</th>
			<th class="text-right">Pris</th>
			<th class="text-right">Heraf moms</th>
			<th class="text-right">Total</th>
		</tr>

		<{section name="i" loop=$products}>
			<{assign var="p" value=$products[i]->getProduct()}>
			<tr>
				<td>
					<{assign var="image" value=$p->getImage()}>
					<{if $image}>
						<a href="<{$p->getRemoteUrl()|escape}>"><img src="<{$image->getSrc(50, 50, 'box')}>" <{$image->getHtmlSize(50, 50, 'box')}> alt="" style="border-radius:100px;"></a>
					<{/if}>
					<a href="<{$p->getRemoteUrl()|escape}>"><{$products[i]->getName()|escape}></a>

					<{assign var="attributes" value=$products[i]->getAttributes()}>
					<{if $attributes}>
						<ul>
							<{section name="j" loop=$attributes}>
								<li><{$attributes[j].name}>: <{$attributes[j].val}></li>
							<{/section}>
						</ul>
					<{/if}>

					<{assign var="file" value=$products[i]->getFile()}>
					<{if $file}>
						<p><strong>Download:</strong> <a href="<{$products[i]->getFileDownloadUrl()|escape}>"><{$file->filename|escape}></a></p>
					<{/if}>
				</td>
				<td>
					<{$products[i]->getAmount()}>
				</td>
				<td class="text-right">
					<{$webshop->getCurrency()}> <{$products[i]->getUnitPrice()|number_format:2:",":"."}>
				</td>
				<td class="text-right">
					<{$webshop->getCurrency()}> <{$products[i]->getUnitVat()|number_format:2:",":"."}>
				</td>
				<td class="text-right">
					<strong><{$webshop->getCurrency()}> <{$products[i]->getPrice($products[i]->getAmount())|number_format:2:",":"."}></strong>
				</td>
			</tr>
		<{/section}>

		<tr>
			<td>
				<strong>TOTAL</strong>
			</td>

			<td>
				<strong><{$order->getOrderProductCount()}></strong>
			</td>

			<td class="text-right">
				<strong><{$order->getTotalPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></strong>
			</td>

			<td class="text-right">
				<strong><{$order->getVat()|number_format:2:",":"."}> <{$webshop->getCurrency()}></strong>
			</td>

			<td class="text-right">
				<strong><{$order->getTotalPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></strong>
			</td>
		</tr>

	</table>

	<div class="mt-4"></div>

	<div class="row">
		<div class="col-10 col-md-6">
			<h3 class="headline">Levering</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
			<p>
				<strong>Leveringsmetode:</strong> <{$order->getShippingName()|escape}><br>
				<strong>Leveringspris:</strong> <{$order->getShippingPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}><br>
			</p>
		</div>

		<{if $order->getPickupAddress()}>
			<div class="col-10 col-md-6">
				<h3 class="headline">Du kan hente din pakke hos</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
				<p><{$order->getPickupAddress()|escape|nl2br}></p>
			</div>
		<{/if}>
	</div>

	<{assign var="voucher" value=$order->getVoucher()}>
	<{if $voucher}>
		<div class="row justify-content-center">
			<div class="col-10 col-md-12">
				<h3 class="headline">Rabatkode</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
			</div>
		</div>

		<p><strong>Rabatkode:</strong> <{$voucher->getCode()|escape}></p>
		<{*<p><strong>Rabat:</strong> <{$voucher->getPercentDiscount()|escape}> %</p>*}>
		<p><strong>Rabat:</strong> <{$order->getVoucherDiscountAmount()|number_format:2:",":"."}> <{$webshop->getCurrency()}></p>
	<{/if}>

	<{*

		<{if $webshop->allowCloneOrder()}>

			<div class="row justify-content-center">
				<div class="col-10 col-md-12">
					<div class="my-4"><a href="#small-dialog-clone" class="popup-with-zoom-anim button color margin-left-0">Bestil ordren igen?</a></div>
				</div>
			</div>

			<div id="small-dialog-clone" class="zoom-anim-dialog mfp-hide">
				<h3 class="headline">Bestil ordren igen</h3><span class="line margin-bottom-25"></span><div class="clearfix"></div>

				<form id="add-comment" method="post">
					<div class="my-3 checkout-content">
						<div class="terms">
							<{if $settings.texts.terms}>
								<{$settings.texts.terms}>
							<{else}>
								Denne shop har ikke nogen betingelser.
								Enten opret nogen, eller indsæt en tom tekst under dine <a href="<{$url|escape}>/theme-setup/settings#tabs-5" target="_blank">designindstillinger</a>.
							<{/if}>
						</div>
					</div>

					<div class="form-group">
						<label for="accept">
							<input id="accept" type="checkbox" name="accept" value="1" required/>
							Jeg accepterer ovenstående handelsbetingelserne.
						</label>
					</div>

					<div class="form-group">
						<input type="submit" value="Godkend, og bestil igen" class="button color" id="send_button" name="clone_order"/>
					</div>

				</form>
			</div>

		<{/if}>

	*}>

	<div class="row mt-4">
		<div class="col-lg-4">
			<div class="row justify-content-center">
				<div class="col-10 col-md-12">
					<h3 class="headline">Bestillingsadresse</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
					<p><{$order->getOrderName()|escape}></p>
					<p><{$order->getOrderCompanyName()|escape}></p>
					<p><{$order->getOrderAddress()|escape}></p>
					<p><{$order->getOrderZipcode()|escape}> <{$order->getOrderCity()|escape}></p>
					<p><{$order->getOrderCountry()|escape}></p>
					<p><{$order->getPhone()|escape}></p>
				</div>
			</div>
		</div>

		<div class="col-lg-4">
			<div class="row justify-content-center">
				<div class="col-10 col-md-12">
					<h3 class="headline">Leveringsadresse</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
					<p><{$order->getDelName()|escape}></p>
					<p><{$order->getDelCompanyName()|escape}></p>
					<p><{$order->getDelAddress()|escape}></p>
					<p><{$order->getDelZipcode()|escape}> <{$order->getDelCity()|escape}></p>
					<p><{$order->getDelCountry()|escape}></p>
				</div>
			</div>
		</div>

		<div class="col-lg-4">
			<div class="row justify-content-center">
				<div class="col-10 col-md-12">
					<h3 class="headline">Kommentar</h3><span class="line margin-bottom-35"></span><div class="clearfix"></div>
					<p><{$order->getComments()|escape}></p>
				</div>
			</div>
		</div>
	</div>

	<div class="my-4"></div>

	<{include file="carousel.html" title="Shop videre" products=$order->getAlsoBought()}>

	<{assign var="products" value=$order->getProducts()}>
	<{section name="i" loop=$products}>
		<{assign var="product" value=$products[i]}>

		<{capture name="box_title"}>Andre der købte <{$product->getName()|escape}> købte også<{/capture}>
		<{include file="carousel.html" title=$smarty.capture.box_title products=$product->getAlsoBought()}>
	<{/section}>

	<{include file="carousel.html" title="Populært lige nu" products=$webshop->getPopularProducts(25, 14)}>

<{/if}>

<div class="mt-4"></div>