<div style="position:relative;left:10px;width:1000px;">

{if $item_data->id}
<h2><a style="text-decoration:none;" href="./index.php?admin_modul=admin_object_list&object=Item">Artikel</a> {if $item_data->name} -&gt; #{$item_data->number} {$item_data->name}{else} -&gt; neu{/if}</h2>
{else}
<h2>Neuer Artikel</h2>
{/if}





<form id="editform" class="edit2 formVariant2" enctype="multipart/form-data" method="post" action="./index.php?admin_modul=admin_item_editor">

	<div id="adminLeftFloater" style="width:980px;">
		<div title="Stammdaten" id="base">
			<div class="edit_icon_bar" style="left:600px;width:350px;">
				{if $item_data->id}
					Letzte &Auml;nderung: {$item_data->last_change_user->firstname} {$item_data->last_change_user->surname} am {$item_data->last_change_date}<br><br>
					<a href="#" id="item_delete_button"><img class="edit_icon" src="{$THEME_DIR}/media/images/delete.png" title="l&ouml;schen" /></a>&nbsp;&nbsp;&nbsp;
					<a href="./index.php?admin_modul=admin_item_editor&id={$item_data->id}&mod=copy"><img class="edit_icon" src="{$THEME_DIR}/media/images/copy.png" title="kopieren" /></a>&nbsp;&nbsp;&nbsp;
					<a href="#" id="item_save_button"><img class="edit_icon" src="{$THEME_DIR}/media/images/save.png" title="speichern" /></a>
				{/if}
			</div>

			<input type="hidden" name="modul" value="admin_item_editor" />
			<input type="hidden" name="id" id="id" value="{$item_data->id}" />
			<input type="hidden" name="form_field[parent_id]" id="parent_id" value="{$item_data->parent_id}" />

			<br />

			{if $item_data->parent_id}
			<div class="edit_element_1_1">
				<label style="width:39%;font-weight:bold;display:inline-block;">Vaterartikel: </label><br />
				<a href="./index.php?admin_modul=admin_item_editor&id={$item_data->parent_item->id}">{$item_data->parent_item->name}</a>
			</div>
			<div class="edit_endline"></div>
			{else}{*
			<div class="edit_element_1_1" style="position:relative;z-index:10;">
				<label style="width:39%;font-weight:bold;display:inline-block;">Vaterartikel: </label>
				<input type="text" id="parent_item_search" style="width:59%;" />
			</div>
			<div class="edit_endline"></div>*}
			{/if}


			<div class="line">

				<div class="edit_element_1_5">
					<label>Status</label>
					<select name="form_field[active]" {if $item_data->parent_id && !$item_variant_config.active}disabled{/if}>
						<option value="0" {if (!isset($item_data->active) && $default_state == 0) || (isset($item_data->active) && $item_data->active == 0)}selected{/if}>inaktiv</option>
						<option value="1" {if (!isset($item_data->active) && $default_state == 1) || (isset($item_data->active) && $item_data->active == 1)}selected{/if}>aktiv</option>
					</select>
				</div>

				<div class="edit_element_1_3">
					<label>Interne-Artikelnummer</label>
					<input name="form_field[number]" value="{$item_data->number}" {if $item_data->parent_id && !$item_variant_config.number}disabled{/if} />
				</div>

				<div class="edit_element_4_5">
					<label>Artikelbezeichnung</label>
					<input name="form_field[name]" value="{$item_data->name}" {if $item_data->parent_id && !$item_variant_config.name}disabled{/if} type="text" />
				</div>

				{foreach item=language from=$content_languages}
				{if $language->iso_639_1 != $system_configuration.default_system_language}
				<div class="edit_element_4_5 multilang_element lang_element_{$language->iso_639_1}" style="display:none;">
					<label>Artikelbezeichnung ({$language->name})</label>
					{assign var="key" value="name_`$language->iso_639_1`"}
					<input id="customerCreationFirstname" name="form_field[name_{$language->iso_639_1}]" value="{$item_data->$key}" type="text" />
				</div>
				{/if}
				{/foreach}

			</div>
			<div class="edit_endline"></div>

			<div class="line">

				<div class="edit_element_1_3">
					<label for="">Hersteller</label>
					<select name="form_field[manufacturer_id]" {if $item_data->parent_id && !$item_variant_config.manufacturer_id}disabled{/if}>
						<option value="0">-</option>
						{foreach from=$manufacturers item=manufacturer}
							<option value="{$manufacturer->id}" {if $manufacturer->id == $item_data->manufacturer_id}selected="selected"{/if}>{$manufacturer->name}</option>
						{/foreach}
					</select>
				</div>

				<div class="edit_element_1_3">
					<label>Hersteller-Artikelnummer</label>
					<input id="meta_title" name="form_field[manufacturer_item_number]" value="{$item_data->manufacturer_item_number}" {if $item_data->parent_id && !$item_variant_config.manufacturer_item_number}disabled{/if} />
				</div>

				<div class="edit_element_1_3">
					<label for="">Lieferant</label>
					<!-- DEBUG INFO:
					vendor_id: {$item_data->vendor_id}
					vendor_id type: {$item_data->vendor_id|@gettype}
					-->
					<select name="form_field[vendor_id]" {if $item_data->parent_id && !$item_variant_config.vendor_id}disabled{/if}>
						<option value="0">-</option>
						{foreach from=$vendors item=vendor}
							<!-- DEBUG: comparing vendor->hersteller_id({$vendor->hersteller_id}) with item_data->vendor_id({$item_data->vendor_id}) -->
							<option value="{$vendor->hersteller_id}" {if $vendor->hersteller_id == $item_data->vendor_id}selected="selected"{/if}>{$vendor->name}</option>
						{/foreach}
					</select>
				</div>

				<div class="edit_element_1_3">
					<label>Lieferant-Artikelnummer</label>
					<input name="form_field[vendor_item_number]" value="{$item_data->vendor_item_number}" {if $item_data->parent_id && !$item_variant_config.vendor_item_number}disabled{/if} />
				</div>

				<div class="edit_element_1_5" style="width:150px;">
					<label>EAN</label>
					<input name="form_field[ean_code]" value="{$item_data->ean_code}" {if $item_data->parent_id && !$item_variant_config.ean_code}disabled{/if} />
				</div>

			</div>
			<div class="edit_endline"></div>


			<div class="edit_element_150" style="height:300px;overflow:auto;">
				<label for="">Kurzbeschreibung</label>
				 {if $item_data->parent_id && !$item_variant_config.short_description}
				 	{$item_data->short_description}
				 {else}
					<textarea name="form_field[short_description]" class="content_box_textbox_2">{$item_data->short_description}</textarea>
				 {/if}
			</div>

			{foreach item=language from=$content_languages}
				{if $language->iso_639_1 != $system_configuration.default_system_language}
					<div class="edit_element_150 multilang_element lang_element_{$language->iso_639_1}" style="height:200px;overflow:auto;display:none;">
					<label for="">Kurzbeschreibung ({$language->name})</label>
					{if $item_data->parent_id && !$item_variant_config.short_description}
						{$item_data->short_description}
					{else}
						{assign var="key" value="short_description_`$language->iso_639_1`"}
						<textarea name="form_field[short_description_{$language->iso_639_1}]" class="content_box_textbox_2">{$item_data->$key}</textarea>
					{/if}
					</div>
				{/if}
			{/foreach}

			<div class="edit_element_150" style="height:500px;overflow:auto;">
				<label for="">Detailbeschreibung</label>
				{if $item_data->parent_id && !$item_variant_config.detail_description}
				<textarea name="form_field[detail_description]" class="content_box_textbox">{$item_data->detail_description}</textarea>
				{else}
				<textarea name="form_field[detail_description]" class="content_box_textbox">{$item_data->detail_description}</textarea>
				{/if}
			</div>

			{foreach item=language from=$content_languages}
				{if $language->iso_639_1 != $system_configuration.default_system_language}
				<div class="edit_element_150 multilang_element lang_element_{$language->iso_639_1}" style="height:400px;overflow:auto;display:none;">
				<label for="">Detailbeschreibung ({$language->name})</label>
					{if $item_data->parent_id && !$item_variant_config.detail_description}
						{assign var="key" value="detail_description_`$language->iso_639_1`"}
						<textarea name="form_field[detail_description_{$language->iso_639_1}]" class="content_box_textbox">{$item_data->$key}</textarea>
					{else}
						{assign var="key" value="detail_description_`$language->iso_639_1`"}
						<textarea name="form_field[detail_description_{$language->iso_639_1}]" class="content_box_textbox">{$item_data->$key}</textarea>
					{/if}
				</div>
				{/if}
			{/foreach}
			<div class="edit_endline"></div>

			<div class="edit_element_1_3">
					<label>Youtube Video</label>
					<input name="form_field[youtube_video]" value="{$item_data->youtube_video}">
			</div>
			<div class="edit_element_1_1" style="height:40px;">
			F&uuml;gen Sie hier bitte nur den Videonamen von Youtube ein. Beispiel Fettgedrucktes einfügen: http://www.youtube.com/watch?v=<b>isKcdfdqJ45SM</b>
			</div>
			<div class="edit_endline"></div>

			<div class="edit_title_toggler {if !$show_attributes}edit_title_hidden{/if}">
				Artikeltypen
				<input type="hidden" value="{if $show_attributes}1{else}0{/if}" class="show_title_field" name="show_attributes">
			</div>
			<div id="container_item_types" class="toggleable_container toggleable_container2" style="position:relative;">
				<div id="item_type_box" style="left:0px;position:relative;">
					<div id="item_type_list">
						{if $item_types}
							{foreach $item_types as $item_type}
								<div class="item_type_entity is_saved">
									<input class="item_type_ordering" name="item_type[item_type_ordering][]" value="{$item_type->item_type_ordering}" type="hidden" />
									<input class="item_type_id" name="item_type[item_type_id][]" value="{$item_type->item_type_id}" type="hidden" />

									 <div class="edit_element_1_3">
										<label>Typ</label>
										<select class="item_type_definition" name="item_type[item_type_definition_id][]">
											{foreach $item_type_definitions as $item_type_definition}
												<option value="{$item_type_definition->item_type_definition_id}" {if $item_type_definition->item_type_definition_id == $item_type->item_type_definition_id}selected="selected"{/if} >{$item_type_definition->item_type_definition_name}</option>
											{/foreach}
										</select>
									</div>
									<div class="edit_element_1_3">
										<label>Text</label>
										<input class="item_type_text" name="item_type[item_type_text][]" value="{$item_type->item_type_text}" type="text" />
									</div>
									{if $item_type->item_type_definition_type == 1}
									<div class="edit_element_1_3">
										<label>Von</label>
										<input class="date_field item_type_text" name="item_type[item_type_available_from][]" value="{$item_type->item_type_available_from}" type="text" />
									</div>
									<div class="edit_element_1_3">
										<label>Bis</label>
										<input class="date_field item_type_text" name="item_type[item_type_available_until][]" value="{$item_type->item_type_available_until}" type="text" />
									</div>
									{else}
										<input name="item_type[item_type_available_from][]" value="0000-00-00" type="hidden" />
										<input name="item_type[item_type_available_until][]" value="0000-00-00" type="hidden" />
									{/if}
									<a href="#" class="delete_item_type"><img src="{$base_dir}/themes/admin/media/images/delete.png" alt="Artikel Typen hinzuf&uuml;gen" /></a>
									<div class="edit_endline"></div>
								</div>
							{/foreach}
						{/if}
					</div>

					<div id="item_type_function">
						<span>Neuen Artikel Typen hinzuf&uuml;gen :</span>
						<a href="#" id="add_item_type"><img src="{$base_dir}/themes/admin/media/images/edit_add.png" alt="Artikel Typen hinzuf&uuml;gen" /></a>
					</div>

					<div id="item_types_to_delete"></div>
				</div>
			</div>
			<br />

			<div class="edit_title_toggler {if !$show_attributes}edit_title_hidden{/if}">
				Attribute und Varianten
				<input type="hidden" value="{if $show_attributes}1{else}0{/if}" class="show_title_field" name="show_attributes">
			</div>
			<div id="container_extended_customerdata" class="toggleable_container toggleable_container2">
				<div class="edit_element_1_3">
					<label>Attributschema</label>
					<select id="item_schema_select" name="form_field[schema_id]" {if $item_data->parent_id}disabled{/if}>
						<option value="0">-</option>
						{foreach from=$schemas item=schema}
						<option value="{$schema->id}" {if $schema->id == $item_data->schema_id}selected="selected"{/if}>{$schema->name}</option>
						{/foreach}
					</select><img id="itemSchemaAjaxPreloader" src="/themes/admin/media/images/preloader_orange.gif" style="display:none;" />
				</div>

				<div class="edit_endline"></div>

					Allgemeine Attribute:<br />
					<div id="item_schema_attr_container">
					{if $item_data->schema_data_attributes}
					{foreach from=$item_data->schema_data_attributes item=attribute}
						{if $item_data->parent_id || ($item_data->schema_data->selectable_attribute_1 != $attribute.number && $item_data->schema_data->selectable_attribute_2 != $attribute.number)}
						<div class="edit_element_2_5">
							<label>{$attribute.name}<span class="span_form">{$attribute.unit}</span></label>
							<input type="text" name="form_field[attribute_{$attribute.number}]" value="{$attribute.value}">
						</div>
						{/if}
					{/foreach}
					{/if}
					</div>
					<div class="edit_endline"></div>
					{if !$item_data->parent_id}
					<div id="item_variants_table">
					Artikelvarianten:<br />
						<table border="0" cellpadding="2" cellspacing="2" style="width:900px;background:#f0f0f0;border: solid 1px #B5C0F9;">
							<tr style="background:#cccccc;">
							  <td style="width:310px;">Aktion</td>
							  <td>
							  	{foreach from=$item_data->schema_data_attributes item=attribute}
									{if $item_data->schema_data->selectable_attribute_1 == $attribute.number}
										{$attribute.name} {if $attribute.unit}({$attribute.unit}){/if}
									{/if}
								{/foreach}
							  </td>
							  <td>
							  	{foreach from=$item_data->schema_data_attributes item=attribute}
									{if $item_data->schema_data->selectable_attribute_2 == $attribute.number}
										{$attribute.name} {if $attribute.unit}({$attribute.unit}){/if}
									{/if}
								{/foreach}
							  </td>
							  <td>Lager</td>
							  <td>Preis (brutto)</td>
							</tr>
							{foreach from=$item_data->variant_structure item=variant_item}
								{if $variant_item.level != 1}
								<tr style="background:#ffffff;">
								  <td>
								  	<input type="button" class="button_delete_variant" rel="{$variant_item.id}" value="l&ouml;schen" name="" style="width:150px;float:left;" />
								  	<input type="button" onclick="window.location.href='./index.php?admin_modul=admin_item_editor&id={$variant_item.id}&action_edit'" value="bearbeiten" name="" style="width:150px;float:left;margin-left:10px;" />
								  	<div style="clear:left;"></div>
								  </td>
								 {assign var="key" value="attribute_`$item_data->schema_data->selectable_attribute_1`"}
								  <td>{$variant_item.data->$key}</td>
								 {assign var="key" value="attribute_`$item_data->schema_data->selectable_attribute_2`"}
								  <td>{$variant_item.data->$key}</td>
								  <td style="text-align:right;">{$variant_item.data->inventory}</td>
								  <td style="text-align:right;">{$variant_item.data->price_1} &euro; ({$variant_item.data->price_1_tax|number_format:"2":".":""} &euro;)</td>
								</tr>
								{/if}
							{/foreach}
							<tr style="background:#ff9900;">
							  <td><input type="button" id="button_new_variant" value="Variante hinzuf&uuml;gen" name="Variante hinzuf&uuml;gen" style="width:310px;" /></td>
							  <td>
							  	{foreach from=$item_data->schema_data_attributes item=attribute}
									{if $item_data->schema_data->selectable_attribute_1 == $attribute.number}
										<input id="new_variant_attr1" type="text" name="form_field[attribute_{$attribute.number}]" value="">
									{/if}
								{/foreach}
							  </td>
							  <td>
							  	{foreach from=$item_data->schema_data_attributes item=attribute}
							  		{if $item_data->schema_data->selectable_attribute_2 == $attribute.number}
										<input id="new_variant_attr2" type="text" name="form_field[attribute_{$attribute.number}]" value="">
									{/if}
								{/foreach}
							  </td>
							  <td>-</td>
							  <td>-</td>
							</tr>
						</table>

					</div>
					{/if}
			</div>
			<br />

			{if !$item_data->parent_id}
			<div class="edit_title_toggler {if !$show_attributes}edit_title_hidden{/if}">
				Warengruppenzuweisung
				<input type="hidden" value="{if $show_attributes}1{else}0{/if}" class="show_title_field" name="show_attributes">
			</div>
			<div id="container_extended_customerdata" class="toggleable_container toggleable_container2">
				<div id="categorical_wrapper" style="position:relative;">
					<div id="item_structure_box">
						<div class="edit_element_1_1" style="height:450px;width:350px;">
							<label for="">Warengruppen Zuweisung</label>
							mit Doppelklick zuweisen
							<select id="not_associated_categories" size="25">
								{foreach item=structure from=$structure_tree}
									<option value="{$structure->id}" class="level{$structure->level} {if $item_structure_assignment && $structure->id|array_key_exists:$item_structure_assignment}levelAssigned{/if}" path="{$structure->path_name|replace:"Warengruppenmenü":"Waren"}/{$structure->name}">{section name=foo loop=$structure->level}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{/section}{$structure->name|replace:"Warengruppenmenü":"Waren"}</option>
								{/foreach}
							</select>
						</div>
						<div class="edit_endline"></div>
					</div>
					<div id="assigned_categories" style="width:430px;position:absolute; left:380px;top:0px;">
						<label for="">Zugewiesene Warengruppen</label>
						<input type="checkbox" style="display: inline; width: 20px;" disabled="disabled" checked="checked" />Checkbox deaktivieren und speichern = Entfernen; <input type="radio" disabled="disabled" checked="checked" style="display: inline; width: 20px;" />Radiobutton = Hauptgruppe

						<div id="associated_categories_container" style="height:420px;overflow:auto;">
							{foreach item=assignedStructure key=assignedStructureId from=$item_structure_assignment}
								<input rel="{$assignedStructureId}" class="ass_cat" id="ass_cat_id_{$assignedStructureId}" type="checkbox" name="assigned_structures[{$assignedStructureId}]" checked="checked" value="{$assignedStructureId}" style="display: inline; width: 20px;" />
								<input rel="{$assignedStructureId}" class="ass_prime_cat" id="ass_prime_cat_id_{$assignedStructureId}" type="radio" name="form_field[structure_id]" {if $item_data->structure_id == $assignedStructureId}checked{/if} value="{$assignedStructureId}" style="display: inline; width: 20px;" />
								<label for="ass_cat_id_{$assignedStructureId}" style="display: inline; width: 90px; font-weight: normal;">{$structure_tree[$assignedStructureId]->path_name|replace:"Warengruppenmenü":"Waren"}/{$structure_tree[$assignedStructureId]->name|replace:"Warengruppenmenü":"Waren"}</label>
								<br />
							{/foreach}
						</div>
					</div>
				</div>

				<!-- Google shopping categories -->
				<div class="edit_element_1_1" id="google_shopping_category_wrapper">
					<label>Google Produktkategorie<span style="font-size:9px;color:#999999;padding-left:5px;">Nur mit der Maus bedienen!</span></label>
					<input id="google_product_category" name="form_field[google_product_category]" value="{$item_data->google_product_category}" type="text" style="margin-bottom:5px;" />
					<select id="google_category_1" class="googleShoppingSelector" style="display:none;">
						<option value="0">-</option>
						{foreach from=$google_item_categories1 item=google_cat_1}
							<option value="{$google_cat_1->id}">{$google_cat_1->name}</option>
						{/foreach}
					</select>
				</div>
				<div class="edit_endline"></div>
			</div>
			<br />
			{/if}



			<div class="edit_title_toggler {if !$show_attributes}edit_title_hidden{/if}">
				Verf&uuml;gbarkeit und Lager
			</div>
			<div id="container_extended_customerdata" class="toggleable_container toggleable_container2">
				<div class="edit_element_2_5">
				<label>Lieferstatus kein Bestand</label>
					<select id="itemShippable" name="form_field[shippable]">
						<option value="1" {if (!isset($item_data->shippable) && $default_shippable == 1) || (isset($item_data->shippable) && $item_data->shippable == 1)}selected="selected"{/if}>lieferbar</option>
						<option value="0" {if (!isset($item_data->shippable) && $default_shippable == 0) || (isset($item_data->shippable) && $item_data->shippable == 0)}selected="selected"{/if}>nicht lieferbar</option>
						<option value="2" {if isset($item_data->shippable) && $item_data->shippable == 2}selected="selected"{/if}>lieferbar ab (bis)</option>
						<option value="3" {if isset($item_data->shippable) && $item_data->shippable == 3}selected="selected"{/if}>lieferzeit unbekannt</option>
						<option value="4" {if isset($item_data->shippable) && $item_data->shippable == 4}selected="selected"{/if}>Bestellartikel  (Lieferzeit 2-3 Tage)</option>
						<option value="5" {if isset($item_data->shippable) && $item_data->shippable == 5}selected="selected"{/if}>Bestellartikel  (Lieferzeit 14 Tage)</option>
					</select>
				</div>

				<div class="edit_element_1_3">
					<label>Ab</label>
					<input id="itemAvailableFrom" name="form_field[available_from]" value="{$item_data->available_from}" type="text" />
				</div>

				<div class="edit_element_1_3">
					<label>Bis (optional)</label>
					<input id="itemAvailableTill" name="form_field[available_till]" value="{$item_data->available_till}" type="text" />
				</div>
				<div class="edit_endline"></div>

				<div class="edit_element_2_5">
					<label>Lager-Nr.</label>
					<input name="form_field[inventory_number]" value="{$item_data->inventory_number}" type="text" />
				</div>
				<div class="edit_element_2_5">
					<label>Regal-Nr.</label>
					<input name="form_field[inventory_rack_number]" value="{$item_data->inventory_rack_number}" type="text" />
				</div>
				<div class="edit_element_1_5">
					<label>Meldebestand</label>
					<input name="form_field[inventory_min]" value="{$item_data->inventory_min}" type="text" />
				</div>
				<div class="edit_element_1_5">
					<label>Bestellmenge</label>
					<input name="form_field[inventory_order_quantity]" value="{$item_data->inventory_order_quantity}" type="text" />
				</div>
				<div class="edit_endline"></div>
				<div class="edit_element_2_5">
					<label>Lieferstatus bei Bestand</label>
						<select id="itemShippable_inventory" name="form_field[shippable_inventory]">
							<option value="1" {if (!isset($item_data->shippable_inventory) && $default_shippable == 1) || (isset($item_data->shippable_inventory) && $item_data->shippable_inventory == 1)}selected="selected"{/if}>lieferbar</option>
							<option value="0" {if (!isset($item_data->shippable_inventory) && $default_shippable == 0) || (isset($item_data->shippable_inventory) && $item_data->shippable_inventory == 0)}selected="selected"{/if}>nicht lieferbar</option>
							{*<option value="2" {if isset($item_data->shippable_inventory) && $item_data->shippable_inventory == 2}selected="selected"{/if}>lieferbar ab (bis)</option>*}
							<option value="3" {if isset($item_data->shippable_inventory) && $item_data->shippable_inventory == 3}selected="selected"{/if}>lieferzeit unbekannt</option>
							<option value="4" {if isset($item_data->shippable_inventory) && $item_data->shippable_inventory == 4}selected="selected"{/if}>Bestellartikel (Lieferzeit 2-3 Tage)</option>
							<option value="5" {if isset($item_data->shippable_inventory) && $item_data->shippable_inventory == 5}selected="selected"{/if}>Bestellartikel (Lieferzeit 14 Tage)</option>
						</select>
				</div>
				<div class="edit_endline"></div>

				<div class="edit_element_1_1" style="height:80px;">
				Die <b>Mindesteinkaufsmenge</b> gibt an, wieviel St&uuml;ck der Kunde mindestens in den Warenkorb legen muss, um den Artikel kaufen zu k&ouml;nnen.<br />
				Die <b>Kaufbare St&uuml;ckmenge</b> gibt die Staffelung der St&uuml;ckzahl des Artikels an, die gekauft werden können. (z.B. immer nur fünfer Schritte also 5; 10; 15 usw...)
				</div>
				<br style="clear:both;"/>
				<div class="edit_element_1_3">
					<label>Mindesteinkaufsmenge</label>
					<input name="form_field[min_quantity]" value="{if !$item_data->min_quantity}1{else}{$item_data->min_quantity}{/if}" />
				</div>
				<div class="edit_element_1_3">
					<label>Kaufbare St&uuml;ckmenge</label>
					<input name="form_field[buy_quantity]" value="{if !$item_data->buy_quantity}1{else}{$item_data->buy_quantity}{/if}" />
				</div>
				<div class="edit_endline"></div>
			</div>
			<br />





			<div class="edit_title_toggler {if $show_price_and_marketing} {else}edit_title_hidden{/if}">Preise und Einheit<input type="hidden" value="{if $show_price_and_marketing}1{else}0{/if}" class="show_title_field" name="show_price_and_marketing"></div>

			<div id="container_extended_customerdata" class="toggleable_container toggleable_container2" >


			<div class="edit_element_1_4">
				<label>EK-Preis<span class="span_form">&euro; netto</span></label>
				<input id="item_base_price" name="form_field[base_price]" value="{$item_data->base_price}" type="text" />
			</div>

			<div class="edit_element_1_4">
				<label>MwSt.<span class="span_form">%</span></label>
				<select id="item_tax" name="form_field[tax_id]">
					<option value="0">-</option>
					{foreach from=$taxes item=tax}
					<option value="{$tax->id}" {if (!$item_data->tax_id && $tax->standard == 1) || $tax->id == $item_data->tax_id}selected="selected"{/if}>{$tax->steuersatz}</option>
						{if $tax->id == $item_data->tax_id}
							{assign var=itemsTax value=$tax->steuersatz}
						{/if}
					{/foreach}
				</select>
			</div>

			<div class="edit_element_1_4">
				<label>Preistyp</label>
				<select name="form_field[price_type]">
					<option value="1" {if (!isset($item_data->price_type) && $default_price_type == 1) || (isset($item_data->price_type) && $item_data->price_type == 1)}selected{/if}>Preis zeigen</option>
					<option value="2" {if (!isset($item_data->price_type) && $default_price_type == 2) || (isset($item_data->price_type) && $item_data->price_type == 2)}selected{/if}>Preis nicht zeigen</option>
					<option value="0" {if (!isset($item_data->price_type) && $default_price_type == 0) || (isset($item_data->price_type) && $item_data->price_type == 0)}selected{/if}>auf Anfrage</option>
				</select>
			</div>

			<div class="edit_element_2_5">
				<label>Preisangebot</label>
				<select name="form_field[bargain_price_type]">
					<option value="0">Deaktiviert</option>
					<option value="1" {if $item_data->bargain_price_type == 1}selected{/if}>Standard</option>
					<option value="2" {if $item_data->bargain_price_type == 2}selected{/if}>Artikeltypenabhängig</option>
				</select>
			</div>

			<div class="edit_element_1_4">
				<label>UVP<span class="span_form">&euro; netto</span></label>
				<input id="uvp_netto" name="uvp_netto" value="{$item_data->uvp_netto}" type="text" />
			</div>
			<div class="edit_element_1_4">
				<label>UVP<span class="span_form">&euro; brutto</span></label>
				<input id="uvp" name="form_field[uvp]" value="{$item_data->uvp}" type="text" />
			</div>
			<div class="edit_endline"></div>

			<div>
				<div class="edit_element_1_4">
					<label>Preis je</label>
					<select id="price_je_vpe" name="form_field[price_je_vpe]">
					<option value="0" {if $item_data->price_je_vpe == "0"}selected="selected"{/if}>St&uuml;ck</option>
					<option value="1"{if $item_data->price_je_vpe == "1"}selected="selected"{/if}>VPE</option>
				</select>
				</div>

				<div class="edit_element_1_4">
					<label>St&uuml;ck je VPE</label>
					<input name="form_field[vpe_amount]" value="{$item_data->vpe_amount}" />
				</div>
			</div>

			<div class="edit_element_1_3">
				<label>Einheit</label>
				<input name="form_field[vpe_unit]" value="{$item_data->vpe_unit}" />
			</div>
			<div class="edit_endline"></div>


			<div id="pricesBigBox" style="padding:10px;background:#c0c0c0;">
				{foreach item=customerGroup from=$customerGroups}
					<table rel="cgt_{$customerGroup->id}" cellspacing="1" cellpadding="2" style="width:100%;">
						<tr style="font-weight:bold;">
							<td rowspan="2" style="background:#F2F5E6;text-align:center;width:50px;">Anzahl</td>
							<td colspan="2" style="background:#FFB651;;text-align:center;">
							  VK - {$customerGroup->name}
							</td>
							<td colspan="2" style="background:#FFB651;text-align:center;">
								Angebotspreise - {$customerGroup->name}
							</td>
						</tr>
						<tr>
							<td style="background:#F5F2E4;text-align:center;">Netto</td>
							<td style="background:#F5F2E4;text-align:center;">Brutto</td>
							<td style="background:#F5E9E6;text-align:center;">Netto</td>
							<td style="background:#F5E9E6;text-align:center;">Brutto</td>
						</tr>
						{section name=pricesLoop start=1 loop=6 step=1}
							{assign var=tmp_quantity value="quantity_`$smarty.section.pricesLoop.index`"}
							{assign var=tmp_price value="price_`$smarty.section.pricesLoop.index`"}
							{assign var=tmp_pricetax value="price_`$smarty.section.pricesLoop.index`_tax"}
							{assign var=tmp_pricebargain value="bargain_price_`$smarty.section.pricesLoop.index`"}
							{assign var=tmp_pricebargaintax value="bargain_price_`$smarty.section.pricesLoop.index`_tax"}
							<tr class="bargain_price_table">
								<td style="display:{if $smarty.section.pricesLoop.index == 1 || $customerGroup->prices->graduated_prices}{else}none{/if};background:#F2F5E6;" class="graduated_td ajax_empty"> <input id="form_field_quantity_{$smarty.section.pricesLoop.index}" name="form_field_prices[prices][group_{$customerGroup->id}][quantity_{$smarty.section.pricesLoop.index}]" value="{if $smarty.section.pricesLoop.index == 1}1{else}{$customerGroup->prices->$tmp_quantity}{/if}" {if $smarty.section.pricesLoop.index == 1}readonly="readonly"{/if} type="text" style="text-align:right;border-color:#FFB651;" /></td>
								<td style="display:{if $smarty.section.pricesLoop.index == 1 || $customerGroup->prices->graduated_prices}{else}none{/if};background:#F5F2E4;" class="graduated_td ajax_empty"> <input id="form_field_price_{$smarty.section.pricesLoop.index}" class="price_net" name="form_field_prices[prices][group_{$customerGroup->id}][price_{$smarty.section.pricesLoop.index}]" value="{$customerGroup->prices->$tmp_price}" type="text" style="text-align:right;border-color:#FFB651;" /></td>
								<td style="display:{if $smarty.section.pricesLoop.index == 1 || $customerGroup->prices->graduated_prices}{else}none{/if};background:#F5F2E4;" class="graduated_td ajax_empty"> <input id="form_field_price_{$smarty.section.pricesLoop.index}_tax" class="price_gross" value="{($customerGroup->prices->$tmp_price/100*(100+$itemsTax))|number_format:"2":".":""}" type="text" style="text-align:right;" /></td>
								<td style="display:{if $smarty.section.pricesLoop.index == 1 || $customerGroup->prices->graduated_prices}{else}none{/if};background:#F5E9E6;" class="graduated_td ajax_empty"> <input id="form_field_bargain_price_{$smarty.section.pricesLoop.index}" class="bargain_net" name="form_field_prices[prices][group_{$customerGroup->id}][bargain_price_{$smarty.section.pricesLoop.index}]" value="{$customerGroup->prices->$tmp_pricebargain}" type="text" style="text-align:right;border-color:#FFB651;" /></td>
								<td style="display:{if $smarty.section.pricesLoop.index == 1 || $customerGroup->prices->graduated_prices}{else}none{/if};background:#F5E9E6;" class="graduated_td ajax_empty"> <input id="form_field_bargain_price_{$smarty.section.pricesLoop.index}_tax" class="bargain_gross" value="{($customerGroup->prices->$tmp_pricebargain/100*(100+$itemsTax))|number_format:"2":".":""}" type="text" style="text-align:right;" /></td>
							</tr>
							{if $smarty.section.pricesLoop.index == 1}
							<tr>
								<td style="background:#F5F2E4;text-align:left;" colspan="5"><div style="position:relative;"><a rel="cgt_{$customerGroup->id}" class="graduated_price_show_button" href="#">Staffelpreise</a></div></td>
							</tr>
							{/if}
						{/section}
					</table>
				{/foreach}
			</div>


		</div>
		<br />







			<div class="edit_title_toggler">
				Versanddaten und Kosten
			</div>
			<div id="container_shipping_data" class="toggleable_container toggleable_container2">
				<div class="edit_element_2_5">
					<label>Versandkosten</label>
						<select id="shipping_cost_type" name="form_field[shipping_cost_type]">
							<option value="0" {if $item_data->shipping_cost_type == 0}selected="selected"{/if}>Standardversandkosten</option>
							<option value="1" {if $item_data->shipping_cost_type == 1}selected="selected"{/if}>Versandkostenfrei</option>
							<option value="2" {if $item_data->shipping_cost_type == 2}selected="selected"{/if}>Eigene Versandkosten</option>
						</select>
				</div>

				<div class="edit_element_1_3">
					<label>Paketart</label>
						<select id="shipping_cost_type" name="form_field[shipping_item_type]">
							<option value="0" {if $item_data->shipping_item_type == 0}selected="selected"{/if}>Normal</option>
							<option value="1" {if $item_data->shipping_item_type == 1}selected="selected"{/if}>Sperrgut</option>
						</select>
				</div>
				<div class="edit_element_1_3">
					<label>Versandgewicht<span class="span_form">kg</span></label>
					<input id="shipping_weight" name="form_field[shipping_weight]" value="{$item_data->shipping_weight}" type="text" />
				</div>
				<div class="edit_endline"></div>

				{if $item_data->shipping_cost_type == 2}
				<div id="item_shipping_costs_table">
						<div style="font-weight:bold;">Spezielle Versandgeb&uuml;hren f&uuml;r diesen Artikel:</div>
						<table border="0" cellpadding="2" cellspacing="2" style="width:910px;background:#f0f0f0;border: solid 1px #B5C0F9;">
							<tr style="background:#cccccc;font-weight:bold;">
							<td>Lieferzone</td>
							<td>Versandgeb&uuml;hren (Euro / brutto)</td>
							</tr>
							{foreach from=$shipping_areas item=shipping_area}
								<tr style="background:#ffffff;">
								<td>{$shipping_area->name}</td>
								<td><input type="text" name="item_shipping_price[]" style="width:100px;" value="{$item_data->shipping_area_costs[$shipping_area->id]->price}" /><input type="hidden" name="item_shipping_id[]" value="{$shipping_area->id}" /></td>
								</tr>
							{/foreach}
						</table>
				</div>
				{/if}

			</div>
			<br />



			<br />
			<input type="submit" name="submit" id="submit" value="Artikel speichern" style="width:200px;position:relative;left:400px;" />
			<br /><br />

		</div> <!-- end base -->
		<div title="Dateien" id="documents">
			{if $item_data->id}
			<div class="edit_title edit_title">Bilder und Dokumente hinzuf&uuml;gen</div>
			<div class="edit_element_1_4">
				{if $system_configuration.item_watermark_activ && $system_configuration.item_watermark_image}
				Wasserzeichen wird gesetzt.
				<input id="watermark_activ" name="watermark_aktiv" type="hidden" value="1">
				{else}
				Wasserzeichen nicht aktiv oder konfiguriert.
				<input id="watermark_activ" name="watermark_activ" type="hidden" value="0">
				{/if}
			</div>

			<br />
			<input id="file_upload" name="Filedata" type="file" />
			<br>
			<input type="submit" name="submit" value="Datei hochladen">

			<div style="clear:both;"></div>
			<div class="edit_title">Bilder</div>

			<div id="file_list">
				<ul id="sortable_images" class="widget_container" style="width:550px;">
					{foreach from=$item_data->files item=file}
						{if $file->type == 0}
							<li id="picelementContainer_{$file->id}" class="{$file->rang}">

								<div class="content_box">
									<div class="header" style="text-align:right;padding-top:4px;padding-right:4px;">
										<a href="#" rel="picelement_{$file->id}" class="delete_pic"><img src="{$base_dir}/themes/admin/media/images/delete.png" alt="L&ouml;schen" /></a>
										<input type="hidden" class="file_id" value="{$file->id}" />
									</div>

									<div class="body" style="text-align:center;">
										<img src="{$SHOP_DIR}/images/article/thumb_{$file->file_name}" alt="" />
									</div>

									<div class="footer">
										<label>Alt Text</label>
										<input type="text" value="{$file->alt}" class="file_alt" />
										{*<label>Variante</label>
										<select class="file_variant">
											<option value="_">-</option>
											{if $item_data->price_variants_1}
												{foreach from=$item_data->price_variants_1 item=variante1}
													{if $item_data->price_variants_2}
														{foreach from=$item_data->price_variants_2 item=variante2}
															<option value="{$variante1}_{$variante2}" {if $variante1 == $file->attribut1 && $variante2 == $file->attribut2}selected="selected"{/if}>{$variante1} {$variante2}</option>
														{/foreach}
													{else}
														<option value="{$variante1}" {if $variante1 == $file->attribut1} selected="selected" {/if} >{$variante1}</option>
													{/if}
												{/foreach}
											{/if}
										</select>*}
										<br /><center><a href="{$SHOP_DIR}/images/article/{$file->file_name}" target="_blank">Bildansicht</a></center>
									</div>
								</div>

							</li>
						{/if}
					{/foreach}
				</ul>
				<div style="clear:both;"></div>
			</div>
			<div style="clear:both;"></div>

			<div class="edit_title">Dokumente</div>

			<div id="item_document_list">
				{foreach from=$item_data->files item=file}
					{if $file->type == 1}
						<div class="item_document" id="item_document_{$file->id}">
							<input class="document_id" type="hidden" value="{$file->id}" />

							<a class="document_link" href="{$document_path}{$file->file_name}">Dokument</a>

							<label class="document_label">Name:</label>
							<input class="document_input" type="text" value="{$file->alt}" />

							<a class="document_delete" href="#" >
								<img alt="Löschen" src="/themes/admin/media/images/delete.png" />
							</a>
						</div>
					{/if}
				{/foreach}
			</div>
			<div style="clear:both;"></div>
			{else}
				Bitte speichern Sie diesen Artikel, bevor Sie Bilder und Dokumente hinzuf&uuml;gen
			{/if}
		</div>
		<div title="SEO" id="seo_container">
			<br />

			<div class="edit_element_75">
				<label for="">Kurz URL</label>
				<input type="text" name="form_field[short_uri]" id="short_uri" value="{$item_data->short_uri}" />
			</div>
			<div class="edit_element_75">
				<label for="">Title</label>
				<input type="text" name="form_field[seo_title]" id="meta_title" value="{$item_data->seo_title}" />
			</div>
			<div class="edit_endline"></div>
			<div class="edit_element_150" style="height:80px;">
				<label for="">Keywords</label>
				<textarea type="text" name="form_field[seo_keywords]" id="short_uri">{$item_data->seo_keywords}</textarea>
			</div>
			<div class="edit_endline"></div>
			<div class="edit_element_150" style="height:80px;">
				<label for="">Description</label>
				<textarea type="text" name="form_field[seo_description]" id="meta_title">{$item_data->seo_description}</textarea>
			</div>
			<div class="edit_element_1_5">
				<label>Kundendaten</label>
				<select name="form_field[has_user_data]">
					<option value="0">Nein</option>
					<option value="1" {if $item_data->has_user_data == 1}selected="selected"{/if}>Ja</option>
				</select>
			</div>
			<div class="edit_endline"></div>
			<br />
			<input type="submit" name="submit" id="submit" value="Artikel speichern" style="width:200px;position:relative;left:400px;" />
			<br /><br />

		</div>


		{if $item_data->id}


		<div title="Bestand" id="inventory_container">
			<br />
			<div id="item_inventory_table">
			<b>Lagerbewegung buchen:</b><br>

			<table border="0" cellpadding="2" cellspacing="1" style="border:1px solid #aaaaaa;background:#cccccc;width:100%;">
				<tr>
					<td style="text-align:left;background:#ff9900;width:300px;text-align:left;">
						<label>Aktion</label><br />
						<select id="inventory_type" name="inventory_type">
							<option value="1">Ladenverkauf</option>
							<option value="2">Wareneingang</option>
							<option value="3">Verlust</option>
							<option value="4">Eigenverbrauch</option>
							<option value="5">Onlineverkauf</option>
						</select>
					</td>
					<td style="text-align:left;background:#ff9900;"><label>St&uuml;ck</label><br /><input style="width:50px;" type="text" id="inventory_amount" name="inventory_amount" value="" /></td>
					<td style="text-align:center;background:#ff9900;" colspan="3"><input type="button" id="button_new_inventory" name="add_item" value="Buchung hinzufügen" /></td>
				</tr>
			</table>

			{if $item_inventory}
				<table border="0" cellpadding="2" cellspacing="2" style="width:100%;border:1px solid #cccccc;">
					<thead>
						<tr style="background:#cccccc;">
							<th style="width:20px;"></th>
							<th>Typ</th>
							<th>Datum</th>
							<th style="text-align:right;">Menge</th>
							<th style="text-align:right;">Summe</th>
						</tr>
					</thead>
					<tbody>
						{foreach from=$item_inventory item=inventory}
						<tr {if $inventory->inventory_object_type_id == 2}style="background:#00ff00;"{/if}>
							<td style="background: #ffffff url({$THEME_DIR}/media/images/{if $inventory->inventory_object_type_id == 2}gruener_pfeil.png{else}roter_pfeil.png{/if}) center center no-repeat;">
								&nbsp;
							</td>
							<td>
								{if $inventory->inventory_object_type_id == 2}
									<a href="./index.php?admin_modul=admin_incomming_goods_editor&id={$inventory->inventory_object_id}">{$inventory->type_name}</a>
								{else}
									{$inventory->type_name}
								{/if}
							</td>
							<td>{$inventory->created}</td>
							<td style="text-align:right;">{$inventory->amount}</td>
							<td style="text-align:right;">{$inventory->price_sum|number_format:"2":",":"."} &euro;</td>
						</tr>
						{/foreach}
					</tbody>
					<tfoot>
						<tr style="background:#cccccc;">
							<th colspan="5" style="text-align:right;font-size:14px;{if $item_data->inventory < 0}color:#ff0000;{/if}">Aktueller Lagerbestand: {$item_data->inventory} St&uuml;ck </th>
						</tr>
						<tr style="background:#cccccc;">
							<th colspan="5" style="text-align:right;font-size:14px;">Wareneingang Gesamt Netto: {$item_inventory_stats.price_sum_input|number_format:"2":",":"."} &euro; </th>
						</tr>
						<tr style="background:#cccccc;">
							<th colspan="5" style="text-align:right;font-size:14px;">Warenausgang Gesamt Netto: {$item_inventory_stats.price_sum_output|number_format:"2":",":"."} &euro; </th>
						</tr>
					</tfoot>
				</table>
			{else}
				<p>Keine Lagerbest&auml;nde vorhanden</p>
			{/if}
			<div class="edit_endline"></div>
			<br />

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




		<div title="Zubehör" id="itemassigns_container">
			<br />
			<div id="itemassign_search_container" style="min-height:500px;">
				<strong style="margin-left:20px;">Artikelbezeichnung oder -nummer</strong> (min. 3 Zeichen, kurz warten)<br />
				<input type="text" id="itemassign_search" style="padding-left:20px;background-position:left center;background-repeat:no-repeat;background-image:none;" /><br />
				<br />

				<div class="ui-widget" style="margin-top:2em;">
					<strong>Gebuchte Artikel</strong>

					<div id="carText" style="" class="ui-widget-content">
						<div id="carList" style="padding:10px;">
						{if $item_items}
						{foreach $item_items as $vitem}
								<div id="carElem{$vitem->item_child_id}" class="ui-widget-header ui-corner-all" style="position: relative; padding-left: 5px; padding-right: 40px; margin-bottom: 5px;">
									{$vitem->name}
									<br>
									<span style="font-weight: normal;">{$vitem->number}</span>
									<input type="hidden" value="{$vitem->item_child_id}" class="accessory_id" name="assignedItemsCollection1[]">
									<div class="ui-icon ui-icon-circle-zoomin link_to_accessory_item" style="position: absolute; right: 20px; top: 1px; cursor: pointer;"></div>
									<div class="ui-icon ui-icon-circle-close delete_accessory_item" style="position: absolute; right: 3px; top: 1px; cursor: pointer;"></div>
								</div>
						{/foreach}
						{/if}
						</div>
					</div>
				</div>

			</div>
			<br />
			<input type="submit" name="submit" id="submit" value="Artikel speichern" style="width:200px;position:relative;left:400px;" />
			<br /><br />
		</div>

		<div title="Ersatzteile" id="itemassigns_container2">
			<br />
			<div id="itemassign_search_container2" style="min-height:500px;">
				<strong style="margin-left:20px;">Artikelbezeichnung oder -nummer</strong> (min. 3 Zeichen, kurz warten)<br />
				<input type="text" id="itemassign_search2" style="padding-left:20px;background-position:left center;background-repeat:no-repeat;background-image:none;" /><br />
				<br />

				<div class="ui-widget" style="margin-top:2em;">
					<strong>Gebuchte Artikel</strong>

					<div id="carText" style="" class="ui-widget-content">
						<div id="car2List" style="padding:10px;">
						{if $item_items2}
						{foreach $item_items2 as $vitem}
								<div id="car2Elem{$vitem->item_child_id}" class="ui-widget-header ui-corner-all" style="position: relative; padding-left: 5px; padding-right: 40px; margin-bottom: 5px;">
									{$vitem->name}
									<br>
									<span style="font-weight: normal;">{$vitem->number}</span>
									<input type="hidden" value="{$vitem->item_child_id}" class="accessory_id" name="assignedItemsCollection2[]">
									<div class="ui-icon ui-icon-circle-zoomin link_to_accessory_item" style="position: absolute; right: 20px; top: 1px; cursor: pointer;"></div>
									<div class="ui-icon ui-icon-circle-close delete_accessory_item" style="position: absolute; right: 3px; top: 1px; cursor: pointer;"></div>
								</div>
						{/foreach}
						{/if}
						</div>
					</div>
				</div>

			</div>
			<br />
			<input type="submit" name="submit" id="submit" value="Artikel speichern" style="width:200px;position:relative;left:400px;" />
			<br /><br />
		</div>

		<div title="Alternativartikel" id="itemassigns_container3">
			<br />
			{if !$item_data->id}
			<div style="padding:20px;background:#FFF3CD;border:1px solid #FFC107;color:#856404;border-radius:5px;margin:20px;">
				<strong>⚠️ Hinweis:</strong> Alternativartikel können erst nach dem ersten Speichern zugeordnet werden.
				<br>Bitte speichern Sie den Artikel zuerst.
			</div>
			{else}
			<div id="itemassign_search_container3" style="min-height:500px;">
				<strong style="margin-left:20px;">Artikelbezeichnung oder -nummer</strong> (min. 3 Zeichen, kurz warten)<br />
				<input type="text" id="itemassign_search3" style="padding-left:20px;background-position:left center;background-repeat:no-repeat;background-image:none;" /><br />
				<br />

				<div class="ui-widget" style="margin-top:2em;">
					<strong>Gebuchte Artikel</strong>

					<div id="carText" style="" class="ui-widget-content">
						<div id="car3List" style="padding:10px;">
						{if $item_items3}
						{foreach $item_items3 as $vitem}
								<div id="car3Elem{$vitem->item_child_id}" class="ui-widget-header ui-corner-all" style="position: relative; padding-left: 5px; padding-right: 40px; margin-bottom: 5px;">
									{$vitem->name}
									<br>
									<span style="font-weight: normal;">{$vitem->number}</span>
									<input type="hidden" value="{$vitem->item_child_id}" class="accessory_id" name="assignedItemsCollection3[]">
									<div class="ui-icon ui-icon-circle-zoomin link_to_accessory_item" style="position: absolute; right: 20px; top: 1px; cursor: pointer;"></div>
									<div class="ui-icon ui-icon-circle-close delete_accessory_item" style="position: absolute; right: 3px; top: 1px; cursor: pointer;"></div>
								</div>
						{/foreach}
						{/if}
						</div>
					</div>
				</div>

			</div>
			<br />
			<input type="submit" name="submit" id="submit" value="Artikel speichern" style="width:200px;position:relative;left:400px;" />
			<br /><br />
			{/if}
		</div>


		{if $system_configuration.item_customer_opinion == 1}
		<div title="Bewertungen" id="item_opinion">
			<b>Kundenbewertungen:</b><br>

			{if $item_opinion}
				<table border="0" cellpadding="2" cellspacing="2">
					<thead>
						<tr>
							<th>Kunde</th>
							<th>Datum</th>
							<th>Bewertung</th>
							<th>Bewertungstext</th>
						</tr>
					</thead>
					<tbody>
						{foreach from=$item_opinion item=opinion}
						<tr>
							<td>{$opinion->user_name}</td>
							<td>{$opinion->timestamp}</td>
							<td>
								<div class="opinion">
									{section name=chk start=1 max=5 loop=6 step=1} 
									{if $opinion->rang >= $smarty.section.chk.index}
									<div class="opinion_bull_active"></div>
									{else}
									<div class="opinion_bull"></div>
									{/if}
									{/section}
									<br style="clear:both;" />
								</div>
							</td>
							<td>{$opinion->opinion_text|truncate:100:"...":true}</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
			{else}
				<p>Keine Bewertungen vorhanden</p>
			{/if}

		</div>
		{/if}

		<div title="Zuordnungen" id="item_cross_selling">

				<table border="0" cellpadding="2" cellspacing="2">
					<thead>
						<tr>
							<th>Nummer</th>
							<th>Bezeichnung</th>
							<th>Status</th>
							<th>Zuordnung</th>
							<th>Aktion</th>
						</tr>
					</thead>
				{if $item_item_child}
					{foreach $item_item_child as $vitem}
							<tr rel="{$vitem->item_parent_id}" class="cross_sell_tr" >
							<td>{$vitem->number}</td>
							<td>{$vitem->name}</td>
							<td>{if $vitem->active == 1}aktiv{else}inaktiv{/if}</td>
							<td>Zubeh&ouml;r</td>
							<td><a class="delete_item_child" rel="{$vitem->item_parent_id}" href="#">Verlinkung l&ouml;schen</a></td>
						</tr>
					{/foreach}
				{/if}

				{if $item_item_child2}
					{foreach $item_item_child2 as $vitem}
						<tr rel="{$vitem->item_parent_id}" class="cross_sell_tr" >
						<td>{$vitem->number}</td>
						<td>{$vitem->name}</td>
						<td>{if $vitem->active == 1}aktiv{else}inaktiv{/if}</td>
						<td>Ersatzteil</td>
						<td><a class="delete_item_child" rel="{$vitem->item_parent_id}" href="#">Verlinkung l&ouml;schen</a></td>
					</tr>
					{/foreach}
				{/if}

				{if $item_item_child3}
					{foreach $item_item_child3 as $vitem}
						<tr rel="{$vitem->item_parent_id}" class="cross_sell_tr" >
						<td>{$vitem->number}</td>
						<td>{$vitem->name}</td>
						<td>{if $vitem->active == 1}aktiv{else}inaktiv{/if}</td>
						<td>Alternativartikel</td>
						<td><a class="delete_item_child" rel="{$vitem->item_parent_id}" href="#">Verlinkung l&ouml;schen</a></td>
					</tr>
					{/foreach}
				{/if}

				</table>

		</div>
		{*<div title="Statistik" id="item_statistic">
			<b>Statistik:</b><br>
		</div>*}
		{/if}
	</div>
</form>
</div>
<script src="{$base_dir}/themes/admin/media/js/admin_item_editor.js"></script>

{if $info_message}<div class="info_message message">{$info_message}</div>{/if}
{if $warning_message}<div class="warning_message message">{$warning_message}</div>{/if}
{if $error_message}<div class="error_message message">{$error_message}</div>{/if}