
<div class="content_item">
	<div id="item_content1" style="position:relative;height:860px;top:0px;">
		<div id="back_button">{$template_text.item_details.button_back}</div>
		<div class="title_wrapper">
			<div class="title" style="width:100%;"><h3 style="font-weight:bold;font-size:18px;">
			{if !$user_lang || $user_lang == $system_configuration.default_system_language || !$shopArticle->name}
				{$shopArticle->name}
			{else}
				{$shopArticle->name_en}
			{/if}
			 {if $shopArticle->manufacturer_data->name}| <span style="color:#cccccc;">von {$shopArticle->manufacturer_data->name}</span>{/if}</h3></div>
			{if $shopArticle->number}<span class="item_number"><span style="font-weight:bold;">{$template_text.item_details.item_number}</span> {$shopArticle->number}</span>{/if}
		</div>


	<div class="image_wrapper">
			{if isset($shopArticle->files[0]) && $shopArticle->files[0]->file_name}
				<div id="image_detailed_container_outer" style="z-index:1;">
					<div id="image_detailed_container_inner">
					{foreach item=file from=$shopArticle->files}
						<a class="detailImage" href="{$SHOP_DIR}images/article/{$file->file_name}"  rel="lightbox-big" title="{$shopArticle->name}" style="background-image: url({$SHOP_DIR}images/article/details_{$file->file_name})"></a>
					{/foreach}
					</div>
				</div>
			{/if}
			{if $shopArticle->files|@count > 1}
				<div id="item_thumb_slider_wrapper">
					<div id="item_thumbs_title">Weitere Artikelbilder</div>
					<div id="thumbContainer">
						<div id="thumbScrollContainer" style="width:{if $shopArticle->files|@count > 3}{$shopArticle->files|@count|ceil*141}{else}423{/if}px;">
							{foreach item=file name=loop_thumbs from=$shopArticle->files}
								<a class="thumbimage" href="{$SHOP_DIR}images/article/{$file->file_name}" rel="lightbox-small" title="{$shopArticle->name}" style="background-image: url({$SHOP_DIR}images/article/thumb_{$file->file_name});"></a>
								{if !$smarty.foreach.loop_thumbs.last}<div style="position:relative;width:1px;height:96px;background:#C6C6C6;float:left;margin-right:20px;"></div>{/if}
							{/foreach}
							<br style="clear:left;" />
						</div>
					</div>
					{if $shopArticle->files|@count > 3}
						<input id="thumbSlideLeft" class="thumbSlider" type="button" value="" />
						<input id="thumbSlideRight" class="thumbSlider" type="button" value="" />
					{/if}
				</div>
			{/if}
	</div>
<form method="post" id="item_buy_form">
	{if $shopArticle->shop_bargain_price_1 > 0}<div id="spezial_price_icon"></div>{/if}
	<div class="item_box_right_wrapper">
		<div id="manufacturer_wrapper">
			<div class="title_manufacturer">{$template_text.default.manufacturer}</div>
			{if $shopArticle->manufacturer_data->logo}<div class="manufacturer_logo" style="background: transparent url({$SHOP_DIR}/images/manufacturers/{$shopArticle->manufacturer_data->logo}) no-repeat center center;"></div>{/if}
			<div class="manufacturer_title">Marke:</div>
			<div class="manufacturer_name">{$shopArticle->manufacturer_data->name} (<a href="/kaufen/{$shopArticle->manufacturer_data->short_uri}/">Mehr von {$shopArticle->manufacturer_data->name}?</a>)</div>
			<div class="category_title">Kategorie:</div>
			<div class="category_name">{$structure_data->name}</div>
		</div>

		<div id="price_box_wrapper">
			<div class="title_price">{$template_text.default.price}</div>
			<div class="register_buy">

				<div id="error_message_one">
					<div class="close_message_box">x</div>
					<div class="content">Mindestabnahmemenge von {$shopArticle->min_quantity} St&uuml;ck nicht erreicht!</div>
				</div>

				<div id="error_message_two">
					<div class="close_message_box">x</div>
					<div class="content">Sie haben eine ung&uuml;ltige St&uuml;ckzahl eingegeben! Die Abnahmest&uuml;ckzahl ist in {$shopArticle->buy_quantity}er Schritten gestaffelt!</div>
				</div>

				<div class="tab"></div>

				{assign var=preis_praefix value=""}
				{assign var=new_price value=""}
				{if $shopArticle->schema_data->selectable_attribute_1 || $shopArticle->schema_data->selectable_attribute_2}
					{assign var=preis_praefix value="ab"}
					{foreach from=$shopArticle->schema_data_attributes item=attribute}
						{if $shopArticle->schema_data->selectable_attribute_1 == $attribute.number}
							{assign var=att_name_1 value="`$attribute.name`"}
							{assign var=att_unit_1 value="`$attribute.unit`"}
						{/if}
					{/foreach}

					{foreach from=$shopArticle->schema_data_attributes item=attribute}
						{if $shopArticle->schema_data->selectable_attribute_2 == $attribute.number}
							{assign var=att_name_2 value="`$attribute.name`"}
							{assign var=att_unit_2 value="`$attribute.unit`"}
						{/if}
					{/foreach}

					<!-- Variant selection -->
					<div class="variant_selection_wrapper">
						<div class="variant_selection_title">W&auml;hlen Sie Ihre gew&uuml;nschte Variante:</div>
						<div class="variant_selection_field" style="position:relative;top:30px;left:15px;">
							<div class="variant_selection_field_title">
								{*{if $shopArticle->schema_data->selectable_attribute_2}Variante:{else}{$att_name_1}:{/if}*}
							</div>
							<div class="variant_selection_field_box">

								<div class="item_variant_box">
									<div class="box_title">
										<span class="button_name">
										{if $shopArticle->schema_data->selectable_attribute_2}Variante:{else}{$att_name_1}:{/if}
										</span>
										<span class="button_text">{if $shopArticle->parent_id}{$shopArticle->name}{else}Noch keine Variante gew&auml;hlt{/if}</span>
									</div>
									<div class="widget_menu_arrow"></div>
								</div>
								<div id="variant_selection_box" style="z-index:999;">
									{foreach item=item name=cartLoop from=$shopArticle->variant_structure}
										{if $item.level != 1 && $item.active == 1}
											{if !$new_price || $new_price > $item.shop_price_1}{assign var=new_price value=$item.shop_price_1}{/if}
											{if $shopArticle->id == $item.id}{assign var=preis_praefix value=""}{/if}

											{if $item.short_uri}<a href="{$item.short_uri}.html">{else}<a href="/index.php?item_id={$item.id}">{/if}
											<div class="cart_item {if $smarty.foreach.cartLoop.first}cart_item_first{/if}">
												<span class="item_amount">
												{if $shopArticle->schema_data->selectable_attribute_1}{assign var="key" value="attribute_`$shopArticle->schema_data->selectable_attribute_1`"}{$att_name_1}: {$item.data->$key} {$att_unit_1}{/if} {if $shopArticle->schema_data->selectable_attribute_2}{assign var="key" value="attribute_`$shopArticle->schema_data->selectable_attribute_2`"}  &nbsp;&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;&nbsp; {$att_name_2}: {$item.data->$key} {$att_unit_2} {/if}
												<br />{if $item.sample_price && $item.price_type != 0}{$item.sample_price|number_format:"2":",":"."} &euro; / {$shopArticle->sample_unit}{/if}
												</span>
												<div class="cart_item_image" style="background:#ffffff url({$SHOP_DIR}/images/article/thumb_{if $item.default_image_file_name}{$item.default_image_file_name}{else}{if $shopArticle->default_image_file_name}{$shopArticle->default_image_file_name}{else}default_image.png{/if}{/if}) center center no-repeat;"></div>
												<span class="item_number">{$item.number}</span>
												{*<span class="item_name">{$item.name|truncate:50:"...":true}</span>*}
												{if $item.price_type != 0}<span class="item_price">{$item.shop_price_1|number_format:"2":",":"."} &euro;</span>{/if}
												<div class="item_delivery_status_1"></div>
											</div>
											</a>
										{/if}
									{/foreach}
								</div>

							</div>
						</div>
					</div>
				{/if}
{*
				<!-- Ersatzteile -->
				{if $shopArticle->assignedItemSet2 && $system_configuration.show_item_item_assign2 == 1}
				<div class="itemassign_selection_wrapper">
					<div class="item_assign_box">
						<div class="box_title">
							<span class="button_text">Ersatzteile zu diesem Artikel</span>
						</div>
						<div class="widget_menu_arrow"></div>
					</div>
					<div class="item_selection_box">
						{foreach item=assigned_item2 name=cartLoop from=$shopArticle->assignedItemSet2}
							 	{if $shopArticle->id == $item.id}{assign var=preis_praefix value=""}{/if}

							  	{if $assigned_item2->short_uri}<a href="{$assigned_item2->short_uri}.html">{else}<a href="/index.php?item_id={$assigned_item2->id}">{/if}
								<div class="cart_item {if $smarty.foreach.cartLoop.first}cart_item_first{/if}">
									<span class="item_amount">
									{$assigned_item2->name}
									</span>
									<div class="cart_item_image" style="background:#ffffff url({$SHOP_DIR}/images/article/thumb_{if $assigned_item2->default_image_file_name}{$assigned_item2->default_image_file_name}{else}default_image.png{/if}) center center no-repeat;"></div>
									<span class="item_number">{$assigned_item2->number}</span>
									<span class="item_price">{$assigned_item2->shop_price_1|number_format:"2":",":"."} &euro;</span>
									<div class="item_delivery_status_1"></div>
								</div>
								</a>
						{/foreach}
					</div>
				</div>
				{/if}
*}

				{if !$no_prices && ($shopArticle->shop_price_1 > 0 || $new_price)}

					{if $shopArticle->price_type == "1" && ($shopArticle->shop_price_1 > 0 || $new_price)}
						{if $shopArticle->shop_bargain_price_1 > 0}
							<span class="old_price">{$preis_praefix} {$shopArticle->shop_price_1|number_format:"2":",":"."} &euro;</span>
							<span class="price">{if $preis_praefix}{$preis_praefix} {$new_price|number_format:"2":",":"."} &euro;{else}{$shopArticle->shop_bargain_price_1|number_format:"2":",":"."} &euro;{/if}</span>
						{else}
							<span class="old_price"></span>
							<span class="price">{if $preis_praefix}{$preis_praefix} {$new_price|number_format:"2":",":"."} &euro;{else}{$shopArticle->shop_price_1|number_format:"2":",":"."} &euro;{/if}</span>
						{/if}
						<span class="price_text">
							{if $shopArticle->price_je_vpe}
								{if $shopArticle->shop_bargain_price_1 > 0}
									{$shopArticle->shop_bargain_price_1 / $shopArticle->vpe_amount|number_format:"2":",":"."} &euro; je &St&uuml;ck |
								{else}
									{$shopArticle->shop_price_1 / $shopArticle->vpe_amount|number_format:"2":",":"."} &euro; je St&uuml;ck | 
								{/if}
							{/if}
							{if $shopArticle->sample_price && $shopArticle->sample_unit && $shopArticle->sample_price > 0}
							<span class="sample_price">{$shopArticle->sample_price|number_format:"2":",":"."}</span> &euro; / {$shopArticle->sample_unit}
							<br />
							{/if}
							<font style="font-size:10px;">{if $shopArticle->shipping_cost_type == 1}{$shopArticle->price_tax_text_free_shipping}{else}{$shopArticle->price_tax_text}{/if}</font>
						</span>

					{if $shopArticle->shippable != 0 && (!$shopArticle->schema_data->selectable_attribute_1 || ($shopArticle->schema_data->selectable_attribute_1 && $shopArticle->parent_id))}
						<input class="amountbox" type="text" value="{if $shopArticle->min_quantity && $shopArticle->min_quantity > 1}{$shopArticle->min_quantity}{else}1{/if}" name="amount" />
						<input class="cartbutton" id="item_cart_button" type="button"  value="In den Warenkorb legen" />
						<input type="hidden" name="buy_quantity" id="input_buy_quantity" value="{$shopArticle->buy_quantity}" />
						<input type="hidden" name="min_quantity" id="input_min_quantity" value="{$shopArticle->min_quantity}" />
					{/if}

					<!-- content_item/graduated_prices.tpl begin --> 
						{if $shopArticle->graduated_prices|is_array && $shopArticle->graduated_prices}
							<div id="graduated_price_wrapper">
								<div class="graduated_price_title_wrapper">
									<div id="graduated_price_title">Staffelpreise</div>
									<div class="graduated_price_title_arrow"></div>
								</div>

								<div id="graduated_price_content">
									<table class="graduatedPrices" border="0" cellpadding="0" cellspacing="3">
									{foreach item=gradPrice name=price_loop key=quantity from=$shopArticle->graduated_prices}
									{if $smarty.foreach.price_loop.iteration == 11}{break}{/if}
										<tr>
											<td>
												&nbsp;ab {$quantity}
												{if $shopArticle->price_je_vpe}
												VPE | {$shopArticle->vpe_amount * $quantity} {$shopArticle->vpe_unit}
												{else}
													St&uuml;ck
												{/if}
											</td>
											{if $gradPrice.bargain > 0}
												<td style="text-decoration: line-through; text-align: right;color:#000000;font-size:11px;font-weight:bold;">
												{if !$no_prices}
													{$gradPrice.price|number_format:"2":",":"."} &euro; / {if $shopArticle->price_je_vpe}VPE{else}St&uuml;ck{/if}
												{else}
													Preis nach Login!
												{/if}
												</td>
												<td style="text-align: right;color:#04428d;font-size:11px;font-weight:bold;">
												{if !$no_prices}
													{$gradPrice.bargain|number_format:"2":",":"."} &euro; / {if $shopArticle->price_je_vpe}VPE{else}St&uuml;ck{/if}
													{if $shopArticle->sample_price && $shopArticle->sample_unit && $shopArticle->sample_price > 0}
													<br /><font style="color:#000000;font-weight:normal;">{$gradPrice.samplePrice|number_format:"2":",":"."} &euro; / {$shopArticle->sample_unit}</font>
													{/if}
												{else}
													Preis nach Login!
												{/if}
												</td>
											{else}
												<td></td>
												<td style="text-align: right;color:#04428d;font-size:11px;font-weight:bold;">
												{if !$no_prices}
													{$gradPrice.price|number_format:"2":",":"."} &euro; / {if $shopArticle->price_je_vpe}VPE{else}St&uuml;ck{/if}
													{if $shopArticle->sample_price && $shopArticle->sample_unit && $shopArticle->sample_price > 0}
													<br /><font style="color:#000000;font-weight:normal;">{$gradPrice.samplePrice|number_format:"2":",":"."} &euro; / {$shopArticle->sample_unit}</font>
													{/if}
												{else}
													Preis nach Login!
												{/if}
												</td>
											{/if}
											<td style="text-align: center;">
											{if $shopArticle->shippable != 0}
													{*<input type="hidden" value="{$quantity}" name="amount" />*}
													<input class="graduatedCart" rel="{$quantity}" bargain_price="{$gradPrice.bargain|number_format:"2":",":"."}" price="{$gradPrice.price|number_format:"2":",":"."}" sample_price="{$gradPrice.samplePrice|number_format:"2":",":"."}" type="button" value="" />

											{/if}
											</td>
										</tr>
										{if !$smarty.foreach.price_loop.last}
										<tr><td colspan="9" style="height:1px;background: #e9e9e9;"></td></tr>
										{/if}
									{/foreach}
									</table>
								</div>
							</div>
						{/if}
						<!-- content_item/graduated_prices.tpl end --> 



						<!-- klarna installments --> 
						{if isset($klarna_installments) && $klarna_installments}
						<div id="klarna_installments_wrapper">
							<h4>Zahlung in Raten</h4>

							<img id="item_klarna_logo" src="{$THEME_DIR}/media/images/klarna_small_130px.png" alt="klarna logo" />

							<p id="installment_text">Die monatliche Rate
								<span id="klarna_installment_rate_target">
									ab
									<span id="installment_currency">&euro;</span>
									{foreach $klarna_installments as $installment}
										<span id="klarna_{$installment.months}_months" class="installment_value" {if !$installment@first}style="display:none;"{/if}>{$installment.monthly_costs|number_format:2:',':" "}</span>
									{/foreach}
								</span>
							</p>
							{*
							<p id="installment_months">Monate:</p>
							<div id="installment_wrapper">
								{foreach $klarna_installments as $installment}
									<div class="monthly_installments{if $installment@first} selected{/if}">{$installment.months}</div>
								{/foreach}
							</div>
							*}
							<br>
							<a id="more_klarna_info" href="">Lesen Sie mehr!</a>
						</div>
						{/if}
					{else}
						<span class="price" style="font-size:12px;">Preis auf Anfrage</span>
					{/if}
				{else}
					<span class="price" style="font-size:12px;">Preis nach Login</span>
				{/if}

			</div>







			<div class="shippable_wrapper">
				<div class="min_quantity">{if $shopArticle->min_quantity && $shopArticle->min_quantity > 1}Mindestabnahmemenge: {$shopArticle->min_quantity} St&uuml;ck{/if}</div>
				<span class="shippable_state">Artikel 
					{if $shopArticle->shippable == 1}
						<font class="item_shippable">lieferbar</font><br>
					{elseif $shopArticle->shippable == 3}
						<font class="item_shippable_unknown">lieferzeit unbekannt</font><br>
					{elseif $shopArticle->shippable == 0}
						<font class="item_not_shippable">nicht lieferbar</font><br>
					{elseif $shopArticle->shippable == 2 && $shopArticle->available_from && $shopArticle->available_till != '0000-00-00'}
						<font class="item_shippable_from_till">lieferbar von {$shopArticle->available_from} bis {$shopArticle->available_till}</font><br>
					{elseif $shopArticle->shippable == 2 && $shopArticle->available_from}
						<font class="item_shippable_from">lieferbar ab {$shopArticle->available_from}</font><br>
					{/if}
				</span>
				<span class="shippable_text">{if $shopArticle->inventory < 1}Artikel bestellt {else} Bestand: {$shopArticle->inventory} {/if} | Versand innerhalb 2 - 3 Werktage</span>
			</div>

		</div>

		<div class="item_banner" style="background:transparent url({$THEME_DIR}/media/images/other/item_banner.jpg) no-repeat;"></div>
	</div>
</form>

	<div class="button_box_wrapper">
		<form method="post">
			<input type="hidden" name="memorize" value="true" />
			<input type="submit" class="remember_button" value="{$template_text.item_details.button_remember}" name="remember_button" />
		</form>
		<a href="?action=print" target="_blank" class="print_button">{$template_text.item_details.button_print}</a>
	</div>

	</div><!-- end content 1 -->




	<div id="item_content2" style="position:relative;top:50px;margin-bottom:20px;">
			{include file='content_item/item_description.tpl'}
			{include file='content_item/item_friends.tpl'}
			<br /><br />
			{if $system_configuration.item_customer_opinion == 1}{include file='content_item/item_opinion.tpl'}{/if}


			<br /><br /><br />	 
	</div>

</div>

<div id="klarna_payment_info_popup" style="display: none; background-color: rgb(255, 255, 255); border: 1px solid black; width: 500px; position: absolute; top: 1px; z-index: 99999; padding: 10px;">
	<iframe id="klarna_iframe" frameborder="0" style="border: 0pt none; width: 500px; height: 660px;" src="https://online.klarna.com/account_de.yaws?eid=13862"></iframe>
	<a class="close" href="#" style="color: rgb(0, 0, 0);">Schliessen</a>
</div>

<script type="text/javascript" src="/libs/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="/libs/star-rating/jquery.MetaData.js"></script>
<script type="text/javascript" src="/libs/star-rating/jquery.rating.js"></script>
<script src="{$PARENT_THEME_DIR}/media/js/content_item.js?v=99455468"></script>

<script type="text/javascript">
var variants = [];
var var2 = [];
{foreach from=$shopArticle->variant_structure item=variant}
	var2['{$variant.variant_key1_md5}'] = {
		'id': '{$variant.id}',
		'attr2': '{$variant.variant_key2_md5}'
	};

	variants.push({
		'id': '{$variant.id}',
		'attr1': '{$variant.variant_key1_md5}',
		'attr2': '{$variant.variant_key2_md5}'
	});
{/foreach}
</script>


<br /><br />


