<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
if($arParams["USE_COMPARE"]=="Y"):
$APPLICATION->IncludeComponent(
"bitrix:catalog.compare.list",
"store",
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"NAME" => $arParams["COMPARE_NAME"],
"DETAIL_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["element"],
"COMPARE_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["compare"],
),
$component
);
endif;
?>
<!--noindex-->
<?if($arParams["USE_FILTER"]=="Y"):?>
<?$APPLICATION->IncludeComponent(
"bitrix:store.catalog.filter",
"",
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"FILTER_NAME" => '',
"FIELD_CODE" => $arParams["FILTER_FIELD_CODE"],
"PROPERTY_CODE" => $arParams["FILTER_PROPERTY_CODE"],
"PRICE_CODE" => $arParams["FILTER_PRICE_CODE"],
"OFFERS_FIELD_CODE" => $arParams["FILTER_OFFERS_FIELD_CODE"],
"OFFERS_PROPERTY_CODE" => $arParams["FILTER_OFFERS_PROPERTY_CODE"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
),
$component
);
?>
<?endif?>
<?
$arAvailableSort = array(
"name" => Array("name", "asc"),
//"price" => Array('catalog_PRICE_'.$arResult['_PRICE_ID'], "asc"),
"price" => Array('PROPERTY_MINIMUM_PRICE', "asc"),
);
$sort = array_key_exists("sort", $_REQUEST) && array_key_exists(ToLower($_REQUEST["sort"]), $arAvailableSort) ? $arAvailableSort[ToLower($_REQUEST["sort"])][0] : "name";
$sort_order = array_key_exists("order", $_REQUEST) && in_array(ToLower($_REQUEST["order"]), Array("asc")) ? ToLower($_REQUEST["order"]) : $arAvailableSort[$sort][1];
?>
<div class="catalog-item-sorting">
<label><?=GetMessage('SECT_SORT_LABEL')?>:</label>
<?foreach ($arAvailableSort as $key => $val):
$className = $sort == $val[0] ? 'selected' : '';
if ($className)
$className .= $sort_order == 'asc' ? ' asc' : ' desc';
$newSort = $sort == $val[0] ? $sort_order == 'desc' ? 'asc' : 'desc' : $arAvailableSort[$key][1];
?>
<a href="<?=$APPLICATION->GetCurPageParam('sort='.$key.'&order='.$newSort, array('sort', 'order'))?>" class="<?=$className?>" rel="nofollow"><?=GetMessage('SECT_SORT_'.$key)?></a>
<?endforeach;?>
</div>
<!--/noindex-->
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.section",
"",
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"ELEMENT_SORT_FIELD" => $sort,//$arParams["ELEMENT_SORT_FIELD"],
"ELEMENT_SORT_ORDER" => $sort_order,//$arParams["ELEMENT_SORT_ORDER"],
"PROPERTY_CODE" => $arParams["LIST_PROPERTY_CODE"],
"META_KEYWORDS" => $arParams["LIST_META_KEYWORDS"],
"META_DESCRIPTION" => $arParams["LIST_META_DESCRIPTION"],
"BROWSER_TITLE" => $arParams["LIST_BROWSER_TITLE"],
"INCLUDE_SUBSECTIONS" => $arParams["INCLUDE_SUBSECTIONS"],
"BASKET_URL" => $arParams["BASKET_URL"],
"ACTION_VARIABLE" => $arParams["ACTION_VARIABLE"],
"PRODUCT_ID_VARIABLE" => $arParams["PRODUCT_ID_VARIABLE"],
"SECTION_ID_VARIABLE" => $arParams["SECTION_ID_VARIABLE"],
"FILTER_NAME" => $arParams["FILTER_NAME"],
"DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_FILTER" => $arParams["CACHE_FILTER"],
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
"SET_TITLE" => $arParams["SET_TITLE"],
"SET_STATUS_404" => $arParams["SET_STATUS_404"],
"DISPLAY_COMPARE" => $arParams["USE_COMPARE"],
"PAGE_ELEMENT_COUNT" => $arParams["PAGE_ELEMENT_COUN |