<h1>Tak for din bestilling</h1>

<p>Tak for din bestilling. Du vil modtage en ordrebekræftelse pr. mail.</p>

<{if $order}>
	<div class="my-4 purchaseThankYouPage"
	data-purchase_id="<{$order->getWebshopOrderId()}>"
	data-purchase_affiliation="-"
	data-purchase_revenue="<{$order->getPrice()|number_format:2:".":""}>"
	data-purchase_tax="<{$order->getVat()|number_format:2:".":""}>"
	data-purchase_shipping="<{$order->getShippingPrice()|number_format:2:".":""}>"
	data-purchase_coupon="<{$order->getVoucherCode()|escape}>"
	>

		<{assign var="products" value=$order->getOrderProducts()}>
		<{section name="i" loop=$products}>
			<{assign var="p" value=$products[i]->getProduct()}>
		
			<div class="ProductEntity"
		  		data-product_name="<{$products[i]->getName()|escape}>"
		  		data-product_id="<{$products[i]->getProductId()}>"
		  		<{assign var="tempcat" value=$p->getMainCategory()}>
		  		<{if $tempcat}>
		  			data-product_category="<{$tempcat->getName()|escape}>"
		  		<{else}>
		  			data-product_category="Ingen hovedkategori"
		  		<{/if}>
		  		data-product_price="<{$products[i]->getUnitPrice()|number_format:2:".":""}>"
		  		data-product_quantity="<{$products[i]->getAmount()|number_format:2:".":""}>"
		  	>
		  	</div>

		  <{/section}>

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

	<{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}>
<{/if}>