{{function name="countPages" iPages=1 iPageNumber=1 sUrl="" sUrl2=""}}
	{{if $iPageNumber > 1}}
		<a href="{{$sUrl}}{{if $iPageNumber > 2}}&amp;iPage={{$iPageNumber - 1}}{{/if}}{{$sUrl2}}">&laquo;&nbsp;{{$lang.pages_prev}}</a>
	{{/if}}
	{{$iPaginationSpacer = false}}
	{{section name=pages start=1 loop=$iPages+1 step=1}}
		{{if $smarty.section.pages.index != $iPageNumber && (abs($smarty.section.pages.index - $iPageNumber) <= $config.pagination_counter_admin || $smarty.section.pages.index <= $config.pagination_counter_admin || $smarty.section.pages.index >=  + $iPages - $config.pagination_counter_admin + 1)}}
			<a href="{{$sUrl}}{{if $smarty.section.pages.index > 1}}&amp;iPage={{$smarty.section.pages.index}}{{/if}}{{$sUrl2}}">{{$smarty.section.pages.index}}</a>
		{{$iPaginationSpacer = false}}
		{{elseif $smarty.section.pages.index == $iPageNumber}}
			<strong>{{$smarty.section.pages.index}}</strong>
		{{else}}
			{{if $iPaginationSpacer === false}}
			<strong>...</strong>
			{{$iPaginationSpacer = true}}
			{{/if}}
		{{/if}}
	{{/section}}
	{{if $iPageNumber < $iPages}}
		<a href="{{$sUrl}}&amp;iPage={{$iPageNumber + 1}}{{$sUrl2}}">{{$lang.pages_next}}&nbsp;&raquo;</a>
	{{/if}}
{{/function}}

{{function name="selectOptions" aOptions=0 mOption=0}}
	{{foreach from=$aOptions item=sOption}}
		<option value="{{$sOption@key}}" {{if ( is_array( $mOption ) && in_array( $sOption@key, $mOption ) ) || ( $sOption@key == $mOption )}}selected="selected"{{/if}}>{{$sOption}}</option>
	{{/foreach}}
{{/function}}

{{* funkcja przed usunięciem spacji *
{{function page_tree aPageTree=$aProduct.aPagesTree bMenu=true}}
	{{if $bMenu && isset($aPageTree.sMenu)}}
		{{$aPageTree.sMenu}}&nbsp;&raquo;&nbsp;
	{{/if}}
	{{foreach from=$aPageTree.aPath item=aPage}}
		{{$aPage.sName}}
		{{if !$aPage@last}}
			&nbsp;&raquo;&nbsp;
		{{/if}}
	{{/foreach}}
{{/function}}
*                                    *}}
{{function page_tree aPageTree=$aProduct.aPagesTree bMenu=true}}{{if $bMenu && isset($aPageTree.sMenu)}}{{$aPageTree.sMenu}}&nbsp;&raquo;&nbsp;{{/if}}{{foreach from=$aPageTree.aPath item=aPage}}{{$aPage.sName}}{{if !$aPage@last}}&nbsp;&raquo;&nbsp;{{/if}}{{/foreach}}{{/function}}

{{function name="generateCategoryTree" list=$aSearch sub=1}}
	{{foreach from=$list item=aData}}
	<option value="{{$aData.iPage}}" {{if $aData.bSelected}}selected="selected"{{/if}}>
		{{section name=Tabulation loop=$sub}}
		-
		{{/section}}
	{{$aData.sName}}</option>
	{{generateCategoryTree list=$aData.aSubcategories sub=$sub+1}}
	{{/foreach}}
{{/function}}

<h1>{{$lang.Products}}</h1>
<div class="filter products-filter">
	<form action="" method="get" id="products-search-form" >
		<fieldset>
			<input type="hidden" name="p" value="{{$_GET.p}}" />
			<input type="hidden" name="sort" value="{{$sSort}}" />
			<div class="field">
				<label for="product-search">{{$lang.search}}</label><br/>
				<input id="product-search" type="text" name="sPhrase" value="{{htmlspecialchars( $_GET.sPhrase )}}" class="input" size="25" /><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_products_list_searcher}}" />
			</div>
			<div class="field">
				{{$lang.Category}}<br/>
				<select name="iCategory[]" multiple="multiple">
					{{generateCategoryTree list=$aSearch.aSearchCategories sub=1}}
				</select>
			</div>
			<div class="field">
				{{$lang.Producer}}<br/>
				<select name="iProducer[]" multiple="multiple">
					{{selectOptions aOptions=$aSearch.aProducers mOption=$_GET.iProducer}}
				</select>
			</div>
			<div class="field">
				{{$lang.Options}}<br/>
				<div id="search_options_container" class="rozwin-container">
					<a href="#search_options" class="rozwin ui-widget ui-multiselect ui-corner-all ui-state-default"><span class="ui-icon ui-icon-triangle-2-n-s"></span><span>Opcje</span></a>
					<div id="search_options" class="ui-multiselect-menu ui-widget ui-widget-content ui-corner-all">
						<ul class="ui-multiselect-checkboxes ui-helper-reset">
						<li><label class="ui-corner-all"><input type="checkbox" name="iStatus" value="1" {{if isset( $_GET.iStatus ) && $_GET.iStatus == 1}}checked="checked"{{/if}} /> {{$lang.Products_Status1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iStatus" value="0" {{if isset( $_GET.iStatus ) && $_GET.iStatus == 0}}checked="checked"{{/if}} /> {{$lang.Products_Status0}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCanBuy" value="1" {{if isset( $_GET.iCanBuy ) && $_GET.iCanBuy == 1}}checked="checked"{{/if}} /> {{$lang.Products_iCanBuy1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCanBuy" value="0" {{if isset( $_GET.iCanBuy ) && $_GET.iCanBuy == 0}}checked="checked"{{/if}} /> {{$lang.Products_iCanBuy0}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iPhoto" value="1" {{if isset( $_GET.iPhoto ) && $_GET.iPhoto == 1}}checked="checked"{{/if}} /> {{$lang.Products_Photo}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iPhoto" value="0" {{if isset( $_GET.iPhoto ) && $_GET.iPhoto == 0}}checked="checked"{{/if}} /> {{$lang.Products_NoPhoto}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iTimePrice" value="2" {{if isset( $_GET.iTimePrice ) && $_GET.iTimePrice == 2}}checked="checked"{{/if}} /> {{$lang.Products_iTimePrice2}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iTimePrice" value="1" {{if isset( $_GET.iTimePrice ) && $_GET.iTimePrice == 1}}checked="checked"{{/if}} /> {{$lang.Products_iTimePrice1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iTimePrice" value="3" {{if isset( $_GET.iTimePrice ) && $_GET.iTimePrice == 3}}checked="checked"{{/if}} /> {{$lang.Products_iTimePrice3}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iDiscounted" value="1" {{if isset( $_GET.iDiscounted )}}checked="checked"{{/if}} /> {{$lang.Products_iDiscounted}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCurrencyDependent" value="1" {{if isset( $_GET.iCurrencyDependent ) && $_GET.iCurrencyDependent == 1}}checked="checked"{{/if}} /> {{$lang.Products_iCurrencyDependent1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCurrencyDependent" value="0" {{if isset( $_GET.iCurrencyDependent ) && $_GET.iCurrencyDependent == 0}}checked="checked"{{/if}} /> {{$lang.Products_iCurrencyDependent0}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCarriersPrices" value="1" {{if isset( $_GET.iCarriersPrices )}}checked="checked"{{/if}} /> {{$lang.Products_iCarriersPrices}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iGroupsDiscounts" value="1" {{if isset( $_GET.iGroupsDiscounts )}}checked="checked"{{/if}} /> {{$lang.Products_iGrouopsDiscounts}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iBuyPrice" value="1" {{if isset( $_GET.iBuyPrice ) && $_GET.iBuyPrice == 1}}checked="checked"{{/if}} /> {{$lang.Products_iBuyPrice1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iBuyPrice" value="0" {{if isset( $_GET.iBuyPrice ) && $_GET.iBuyPrice == 0}}checked="checked"{{/if}} /> {{$lang.Products_iBuyPrice0}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iVariants" value="1" {{if isset( $_GET.iVariants ) && $_GET.iVariants == 1}}checked="checked"{{/if}} /> {{$lang.Products_iVariants1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iVariants" value="2" {{if isset( $_GET.iVariants ) && $_GET.iVariants == 2}}checked="checked"{{/if}} /> {{$lang.Products_iVariants2}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iDescription" value="1" {{if isset( $_GET.iDescription ) && $_GET.iDescription == 1}}checked="checked"{{/if}} /> {{$lang.Products_iDescription1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iDescription" value="0" {{if isset( $_GET.iDescription ) && $_GET.iDescription == 0}}checked="checked"{{/if}} /> {{$lang.Products_iDescription0}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCompare" value="1" {{if isset( $_GET.iCompare ) && $_GET.iCompare == 1}}checked="checked"{{/if}} /> {{$lang.Products_iCompare1}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iCompare" value="0" {{if isset( $_GET.iCompare ) && $_GET.iCompare == 0}}checked="checked"{{/if}} /> {{$lang.Products_iCompare0}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iNewComments" value="1" {{if isset( $_GET.iNewComments )}}checked="checked"{{/if}} /> {{$lang.Products_iNewComments}}</label></li>
						<li><label class="ui-corner-all"><input type="checkbox" name="iWaitingAvailNewsletter" value="1" {{if isset( $_GET.iWaitingAvailNewsletter )}}checked="checked"{{/if}} /> {{$lang.Products_iWaitingAvailNewsletter}}</label></li>
						{{for $iPromoted=1 to $config.promoted_types}}
							<li><label class="ui-corner-all"><input type="checkbox" name="aPromoted[{{$iPromoted}}]" value="1" {{if isset( $_GET.aPromoted[$iPromoted] )}}checked="checked"{{/if}} /> {{$lang.Products}} "{{$config["promoted{{$iPromoted}}_name"]}}"</label></li>
						{{/for}}
						</ul>
					</div>
				</div>
			</div>
			<div class="adv">
				{{if is_array($aSearch.aAttributes) && count($aSearch.aAttributes) > 0}}
					<div class="attributes">
						<h2>{{$lang.Attributes}}</h2>	
						{{foreach from=$aSearch.aAttributes item=aAttribute key=iAttribute}}
							<div class="attribute">
								<label for="search-aAttributeValue-{{$iAttribute}}">{{$aAttribute.sName}}</label>
								<select name="aAttributeValue[{{$iAttribute}}]" id="search-aAttributeValue-{{$iAttribute}}">
									<option value="">{{$lang.All}}</option>
									{{foreach from=$aAttribute.aAValues key=iValue item=sValue}}
										<option value="{{$iValue}}" {{if $iValue == $aSearch.aSelectedAttributes.$iAttribute}}selected="selected"{{/if}}>{{$sValue}}</option>
									{{/foreach}}
								</select>
							</div>
						{{/foreach}}
					</div>
				{{/if}}
			</div>
			<div class="field">
				<input type="submit" class="submit" value="{{$lang.search}}" />
			</div>
			<div class="field">
				<select name="iStore" style="margin: 18px 0 0 30px;">
					{{foreach from=$aStores item=sStore}}
						<option value="{{$sStore@key}}">{{$sStore}}</option>
					{{/foreach}}
				</select>
			</div>
			<div class="field">
				<button type="submit" class="submit" name="p" value="{{$_GET.p}}-export">{{$lang.Export}}</button>
			</div>
		</fieldset>
	</form>
	<script type="text/javascript">
		$(document).ready(function(){
			$("form#products-goto-form").validate();
			$("form#products-goto-form #products-goto-value").rules("add", {required: true});
		});
	</script>
	<form action="" method="get" id="products-goto-form">
		<fieldset>
			<input type="hidden" name="p" value="products-form" />
			<div class="field">
				<label for="products-goto-value">{{$lang.Go_to_product}}</label><br/>
				<input id="products-goto-value" type="text" name="iProduct" value="" class="input" size="50" />
				<input type="submit" class="submit" value="{{$lang.go}}" />
			</div>
		</fieldset>
	</form>
	<div class="clear"></div>
</div>
<div class="clear"></div>
<script type="text/javascript">
$(document).ready(function(){
	$('a.editname').click(function(e){
		e.preventDefault();
		var namea = $(this).prev('a');
		var name = prompt( 'Nowa nazwa: ', namea.html() );
		if( name.length > 0 ){
			$.post( 'admin.php?p=products-changename', {'iProduct': $(this).closest('tr').find('td.id').html(), 'sName': name}, function(data){
				if( data == 'OK' ){
					namea.html( name );
				} else{
					alert( data );
				}
			});
		});
	});
});
</script>
{{if count( $aProducts.aList ) > 0}}
	{{if strpos( $sUrlExt, '?' ) === 0}}
		{{$sUrlExt = preg_replace( '/\?/', '&amp;', $sUrlExt, 1 )}}
	{{/if}}
	<form action="?p={{$_GET.p}}" method="post" id="main-form">
		<fieldset>
			<table class="list" id="products">
				<thead>
					<tr>
					<td colspan="5" class="pages">{{if $aProducts.aPagesCountData.iCount > 1}}{{$lang.Pages}}: {{countPages iPages=$aProducts.aPagesCountData.iCount iPageNumber=$aProducts.aPagesCountData.iPageNumber sUrl='admin.php?p=products-'|cat:$a sUrl2=$sUrlExt}}{{/if}}</td>
					<td colspan="4" class="enabled">
					</td>
					<td colspan="3"></td>
					</tr><tr>
					<th><input type="checkbox" id="select-all" /></th>
					<th class="id"><a class="sort sort_id{{if $sSort == 'id_ASC'}} ASC{{elseif $sSort == 'id_DESC'}} DESC{{/if}}" href="{{preg_replace('#&(sort|iPage)=[a-zA-Z_1-9]*#', '', $request_uri)}}{{if $sSort == 'id_ASC'}}&sort=id_DESC{{else}}&sort=id_ASC{{/if}}"></a><span>{{$lang.Id}}</span></th>
					<th class="photo">{{$lang.Photo}}</th>
					<th class="name"><a class="sort sort_name{{if $sSort == 'name_ASC'}} ASC{{elseif $sSort == 'name_DESC'}} DESC{{/if}}" href="{{preg_replace('#&(sort|iPage)=[a-zA-Z_1-9]*#', '', $request_uri)}}{{if $sSort == 'name_ASC'}}&sort=name_DESC{{else}}&sort=name_ASC{{/if}}"></a><span>{{$lang.Name}}</span></th>
					<th class="index"><a class="sort sort_ProductIndex{{if $sSort == 'ProductIndex_ASC'}} ASC{{elseif $sSort == 'ProductIndex_DESC'}} DESC{{/if}}" href="{{preg_replace('#&(sort|iPage)=[a-zA-Z_1-9]*#', '', $request_uri)}}{{if $sSort == 'ProductIndex_ASC'}}&sort=ProductIndex_DESC{{else}}&sort=ProductIndex_ASC{{/if}}"></a><span>{{$lang.ProductIndex}}</span></th>
					<th class="pages">{{$lang.Pages}}</th>
					<th class="price netto">{{$lang.Price}} [{{$config.currency_symbol}}]<br/>{{$lang.Netto}}</th>
					<th class="price gross"><a class="sort sort_price{{if $sSort == 'price_ASC'}} ASC{{elseif $sSort == 'price_DESC'}} DESC{{/if}}" href="{{preg_replace('#&(sort|iPage)=[a-zA-Z_1-9]*#', '', $request_uri)}}{{if $sSort == 'price_ASC'}}&sort=price_DESC{{else}}&sort=price_ASC{{/if}}"></a>{{$lang.Price}} [{{$config.currency_symbol}}]<br/>{{$lang.Gross}}</th>
					<th class="stock"><a class="sort sort_stockLevel{{if $sSort == 'stockLevel_ASC'}} ASC{{elseif $sSort == 'stockLevel_DESC'}} DESC{{/if}}" href="{{preg_replace('#&(sort|iPage)=[a-zA-Z_1-9]*#', '', $request_uri)}}{{if $sSort == 'stockLevel_ASC'}}&sort=stockLevel_DESC{{else}}&sort=stockLevel_ASC{{/if}}"></a><span>{{$lang.Stock_level}}</span></th>
					<th class="position"><a class="sort sort_position{{if $sSort == 'position_ASC'}} ASC{{elseif $sSort == 'position_DESC'}} DESC{{/if}}" href="{{preg_replace('#&(sort|iPage)=[a-zA-Z_1-9]*#', '', $request_uri)}}{{if $sSort == 'position_ASC'}}&sort=position_DESC{{else}}&sort=position_ASC{{/if}}"></a><span>{{$lang.Position}}</span></th>
					<th class="enabled">{{$lang.Active}}</th>
					<th class="options">{{$lang.Actions}}</th>
					</tr>
				</thead>
				<tfoot>
					<tr class="actions">
					<td colspan="5" class="pages">{{if $aProducts.aPagesCountData.iCount > 1}}{{$lang.Pages}}: {{countPages iPages=$aProducts.aPagesCountData.iCount iPageNumber=$aProducts.aPagesCountData.iPageNumber sUrl='admin.php?p=products-'|cat:$a sUrl2=$sUrlExt}}{{/if}}</td>
					</tr>
				</tfoot>
				<tbody>
					{{foreach from=$aProducts.aList item=aProduct}}
						<tr>
							<td class="selected"><input type="checkbox" name="aProductsSelect[]" value="{{$aProduct.iProduct}}" /></td>
							<td class="id">{{$aProduct.iProduct}}</td>
							<td class="photo">{{if isset( $aProduct.aDataImage )}}<a href="{{$config.dir_files}}{{$aProduct.aDataImage.sFileName}}" class="photo"><img src="{{$config.dir_files}}30/{{$aProduct.aDataImage.sFileName}}" alt="(f)"/></a>{{/if}}</td>
							<td class="name"><a href="?p={{$aActions.f}}-form&amp;iProduct={{$aProduct.iProduct}}">{{$aProduct.sName}}</a> <a class="editname" href="#"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a></td>
							<td class="index">{{$aProduct.sProductIndex}} {{if !empty( $aProduct.sAdminInfo )}}<img src="templates/admin/images/ico/comment-new.png" title="{{$aProduct.sAdminInfo}}" class="tTip" style="width: 16px; height: 16px;" />{{/if}}</td>
							<td class="pages">{{page_tree aPageTree=$aProduct.aPages}}</td>
							<td class="price netto">{{number_format( $aProduct.fPrice / ( 1 + $aProduct.fVatValue ), 2, '.', '' )}}</td>
							<td class="price gross"><div class="input">{{number_format( $aProduct.fPrice, 2, '.', '' )}}</div></td>
							<td class="stock"><div class="input">{{$aProduct.iStock}}</div></td>
							<td class="position"><input type="text" name="aPositions[{{$aProduct.iProduct}}]" value="{{$aProduct.iPosition}}"  size="2" maxlength="5" /></td>
							<td class="enabled"><input type="checkbox" name="aStatus[{{$aProduct.iProduct}}]" {{if $aProduct.iStatus}}checked="checked"{{/if}} value="1" /></td>
							<td class="actions">
								<a href="?p=comments-list&amp;iProduct={{$aProduct.iProduct}}" class="product-comments"><img src="{{$config.dir_templates}}admin/images/ico/{{if $aProduct.bNewComments}}comment-new.png{{else}}comment.png{{/if}}" alt="{{$lang.Products_comment}}" title="{{$lang.Products_comment}}" /></a>
								<a href="?p={{$aActions.f}}-form&amp;iProduct={{$aProduct.iProduct}}" class="product-edit"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
								<input class="clone_quantity" type="text" value="1" /> <a href="?p={{$aActions.f}}-clone&amp;iProduct={{$aProduct.iProduct}}&amp;iQuantity=1" class="product-clone"><img src="{{$config.dir_templates}}admin/images/ico/clone.png" alt="{{$lang.Clone_product}}" title="{{$lang.Clone_product}}" /></a>
								<a href="?p={{$aActions.f}}-delete&amp;iProduct={{$aProduct.iProduct}}" class="product-delete delete"><img src="{{$config.dir_templates}}admin/images/ico/delete.png" alt="{{$lang.Delete}}" title="{{$lang.Delete}}"/></a>
								&nbsp;&nbsp;
								<a href="?p=allegro-products_form&amp;iProduct={{$aProduct.iProduct}}" class="product-allegro"><img src="{{$config.dir_templates}}admin/images/ico_allegro.png" alt="{{$lang.Allegro_sent}}" title="{{$lang.Allegro_sent}}" /></a>
								<a href="?p=ebay-products_form&amp;iProduct={{$aProduct.iProduct}}" class="product-ebay"><img src="{{$config.dir_templates}}admin/images/ico_ebay.png" alt="{{$lang.Ebay_sent}}" title="{{$lang.Ebay_sent}}" /></a>
								<a href="?p=swistak-products_form&amp;iProduct={{$aProduct.iProduct}}" class="product-swistak"><img src="{{$config.dir_templates}}admin/images/ico_swistak.png" alt="{{$lang.Swistak_sent}}" title="{{$lang.Swistak_sent}}" /></a>
							</td>
						</tr>
					{{/foreach}}
				</tbody>
			</table>
			<div class="save float"><div class="floatcontainer">
				<label>
					{{$lang.With_chosen}}:
					<select name="sMultipleModify" id="multiple_modify">
						<option value="delete">{{$lang.Delete}}</option>
						<option value="modify_price">{{$lang.Modify_price}}</option>
						<option value="cancel_promotion">{{$lang.Cancel_promotion}}</option>
						<option value="time_price_set">{{$lang.Time_price_set}}</option>
						<option value="options_set">{{$lang.Options_set}}</option>
						<option value="carriers_prices_set">{{$lang.Carriers_prices_set}}</option>
						<option value="description">{{$lang.Description_generate}}</option>
						<option value="discounts">{{$lang.Products_discounts}}</option>
						<option value="related">{{$lang.Products_related}}</option>
						<option value="advsearcher">{{$lang.Adv_searcher}} - {{$lang.Add}}</option>
						<option value="advsearcher_clear">{{$lang.Adv_searcher}} - {{$lang.Clear}}</option>
					</select>
				</label>
				<label class="multiple_additional_option related">{{$lang.Related}} <select name="iRelated">
					{{section name=related start=1 loop=$config.related_boxes+1 step=1}}
						<option value="{{$smarty.section.related.index}}">{{$config["related`$smarty.section.related.index`_name"]}}</option>
					{{/section}}
				</select></label>
				<label class="multiple_additional_option modify_price">{{$lang.Modify_price_desc}}: <input type="text" name="sModifyPriceBy" /></label>
				<label class="multiple_additional_option time_price_set">{{$lang.From}}: <input type="text" name="sPriceTimeFrom" class="datetime" /></label>
				<label class="multiple_additional_option time_price_set">{{$lang.To}}: <input type="text" name="sPriceTimeTo" class="datetime" /></label>
				<label class="multiple_additional_option time_price_set">{{$lang.Price}}: <input type="text" name="sPriceTimeValue" /> <img style="float: none; vertical-align: middle;" class="tTip info" src="templates/images/info.png"  title="{{$lang.help_products_multiple_modify_time_price}}" /></label>
				<fieldset class="multiple_additional_option options_set" >
					<table>
						<tr>
							<th>{{$lang.Status}}</th>
							<td><select name="active_status"><option value="">{{$lang.No_change}}</option><option value="0">{{$lang.Off}}</option><option value="1">{{$lang.On}}</option></select></td>
						</tr>
						<tr>
							<th>{{$lang.Products_comment}}</th>
							<td><select name="comments"><option value="">{{$lang.No_change}}</option><option value="0">{{$lang.Off}}</option><option value="1">{{$lang.On}}</option></select></td>
						</tr>
						<tr>
							<th>{{$lang.Products_compare}}</th>
							<td><select name="compare"><option value="">{{$lang.No_change}}</option><option value="0">{{$lang.Off}}</option><option value="1">{{$lang.On}}</option></select></td>
						</tr>
						<tr>
							<th>{{$lang.ActiveDiscount}}</th>
							<td><select name="active_discount"><option value="">{{$lang.No_change}}</option><option value="0">{{$lang.Off}}</option><option value="1">{{$lang.On}}</option></select></td>
						</tr>
						{{for $iPromoted=1 to $config.promoted_types}}
							<tr>
								<th>{{$config["promoted{{$iPromoted}}_name"]}}</th>
								<td><select name="promoted[{{$iPromoted}}]"><option value="">{{$lang.No_change}}</option><option value="0">{{$lang.Off}}</option><option value="1">{{$lang.On}}</option></select></td>
							</tr>
						{{/for}}
						<tr>
							<th>{{$lang.StockSendAdminMin}}</th>
							<td><input type="text" name="iStockSendAdminMin" /></td>
						</tr>
					</table>					
				</fieldset>
				<fieldset class="multiple_additional_option carriers_prices_set">
					<table class="list">
					{{foreach from=$aGeneralInfo.aCarriers item=aCarrier}}
						<tr><th>{{$aCarrier.sName}}</th><td><input name="aCarrierPrice[{{$aCarrier.iCarrier}}]" type="text" /></td></tr>
					{{/foreach}}
					</table>
				</fieldset>
				<input type="submit" class="submit" name="sMultipleModifyOption" value="{{$lang.Do}}" style="margin-right: 100px;" />
				<input type="submit" class="submit" name="sOption" value="{{$lang.Save}}" />
				<fieldset class="multiple_additional_option discounts">
					<table id="product-discounts" class="details">
					<tbody>
					<tr><td colspan="5" class="help">{{$lang.help_product_discounts}}</td></tr>
					<tr>
						<th>{{$lang.Group_name}}</th><th>{{$lang.Discount}}</th><th>{{$lang.Can_see}}</th><th>{{$lang.Can_see_price}}</th><th>{{$lang.Can_buy}}</th>
					</tr>
					<tr>
						<td>{{$lang.Not_logged_in}}</td><td></td>
						<td><input type="hidden" name="iVisibleAll" value="0" /><input type="checkbox" name="iVisibleAll" value="1" checked="checked" /></td>
						<td><input type="hidden" name="iVisiblePriceAll" value="0" /><input type="checkbox" name="iVisiblePriceAll" value="1" checked="checked" /></td>
						<td><input type="hidden" name="iCanBuyAll" value="0" /><input type="checkbox" name="iCanBuyAll" value="1" checked="checked" /></td>
					</tr>
					{{foreach from=$aGeneralInfo.aUsersGroups item=aGroup}}
					<tr>
						<td class="name"><label for="fDiscount_{{$aGroup.iGroup}}">{{$aGroup.sName}}</label></td>
						<td class="value"><input name="aDiscounts[{{$aGroup.iGroup}}]" id="fDiscount_{{$aGroup.iGroup}}" value="" /></td>
						<td><input type="hidden" name="aGroupsInfo[{{$aGroup.iGroup}}][iVisible]" value="0" /><input type="checkbox" name="aGroupsInfo[{{$aGroup.iGroup}}][iVisible]" value="1" /></td>
						<td><input type="hidden" name="aGroupsInfo[{{$aGroup.iGroup}}][iVisiblePrice]" value="0" /><input type="checkbox" name="aGroupsInfo[{{$aGroup.iGroup}}][iVisiblePrice]" value="1" /></td>
						<td><input type="hidden" name="aGroupsInfo[{{$aGroup.iGroup}}][iCanBuy]" value="0" /><input type="checkbox" name="aGroupsInfo[{{$aGroup.iGroup}}][iCanBuy]" value="1" /></td>
					</tr>
					{{/foreach}}
					</tbody>
					</table>
				</fieldset>
				<label class="multiple_additional_option description">{{$lang.Full_description}} <div>{{htmlEditor sName='sDescriptionFull' iH='300px' iW='750px' sContent=$aProduct.sDescriptionFull}}</div></label>
				<fieldset class="multiple_additional_option advsearcher">
					<table class="list">
						<tr>
							<td colspan="3">
								{{foreach from=$aGeneralInfo.aAdvsearcherColumns item=sColumn}}
									<div class="advsearcher_column_container">
										<div id="advsearcher_quick_add-{{$sColumn@key}}" class="dialog" title="{{$lang.New_advsearcher_value}}: {{$sColumn}}">
											<label>{{$lang.Advsearcher_value}}: <input type="text" name="sNewValue" /></label> <input type="hidden" class="rel_additional" value=".advsearcher-column-{{$sColumn@key}}" /> <input type="hidden" class="rel" value="#advsearcher_add_{{$sColumn@key}}" /> <input type="hidden" class="action" value="admin.php?p=advsearcher-ajax_value&amp;iColumn={{$sColumn@key}}&amp;{{if !$sColumn@first}}iParentValue=&amp;{{/if}}sValue=" />
										</div>
										<label class="advsearcher_column" for="advsearcher_add_{{$sColumn@key}}">
											{{$sColumn}}
										</label>
										<span class="advsearcher_column">
											<select id="advsearcher_add_{{$sColumn@key}}" class="advsearcher-column-{{$sColumn@key}} {{if $sColumn@last}}advsearcher_add_last{{/if}}" {{if !$sColumn@first}}disabled="disabled"{{/if}}>
												<option value="">{{$lang.Select}}</option>
												{{if $sColumn@first}}{{foreach from=$aGeneralInfo.aAdvsearcherValues item=sValue}}<option value="{{$sValue@key}}">{{$sValue}}</option>{{/foreach}}{{/if}}
											</select>
										</span>
										<span><a href="#advsearcher_quick_add-{{$sColumn@key}}" class="dialog"><img src="{{$config.dir_templates}}admin/images/ico/add.png" alt="{{$lang.New_advsearcher_value}}" /></a></span>
									</div>
								{{/foreach}}
								<a href="#" class="add new_element">{{$lang.Add}}</a>
							</td>
						</tr>
					</table>
				</fieldset>
			</div></div>
		</fieldset>
	</form>
{{else}}
	<div class="msg" id="error">
		<img src="{{$config.dir_templates}}admin/images/ico/msg_error.png" class="imgv" alt="" /> {{$lang.Data_not_found}}
	</div>
{{/if}}