Здравствуйте - помогите пожалуйста нужно реализовать .
Сортировать по: Производителю
вот файл catalog - section
версия битрикс 11 ..
Помогите может кто и писал раньше либо стандартное решение есть ?
Сортировать по: Производителю
вот файл catalog - section
Код |
---|
<?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_COUNT"], "LINE_ELEMENT_COUNT" => $arParams["LINE_ELEMENT_COUNT"], "PRICE_CODE" => $arParams["PRICE_CODE"], "USE_PRICE_COUNT" => $arParams["USE_PRICE_COUNT"], "SHOW_PRICE_COUNT" => $arParams["SHOW_PRICE_COUNT"], "PRICE_VAT_INCLUDE" => $arParams["PRICE_VAT_INCLUDE"], "DISPLAY_TOP_PAGER" => $arParams["DISPLAY_TOP_PAGER"], "DISPLAY_BOTTOM_PAGER" => $arParams["DISPLAY_BOTTOM_PAGER"], "PAGER_TITLE" => $arParams["PAGER_TITLE"], "PAGER_SHOW_ALWAYS" => $arParams["PAGER_SHOW_ALWAYS"], "PAGER_TEMPLATE" => $arParams["PAGER_TEMPLATE"], "PAGER_DESC_NUMBERING" => $arParams["PAGER_DESC_NUMBERING"], "PAGER_DESC_NUMBERING_CACHE_TIME" => $arParams["PAGER_DESC_NUMBERING_CACHE_TIME"], "PAGER_SHOW_ALL" => $arParams["PAGER_SHOW_ALL"], "OFFERS_CART_PROPERTIES" => $arParams["OFFERS_CART_PROPERTIES"], "OFFERS_FIELD_CODE" => $arParams["LIST_OFFERS_FIELD_CODE"], "OFFERS_PROPERTY_CODE" => $arParams["LIST_OFFERS_PROPERTY_CODE"], "OFFERS_SORT_FIELD" => $arParams["OFFERS_SORT_FIELD"], "OFFERS_SORT_ORDER" => $arParams["OFFERS_SORT_ORDER"], "OFFERS_LIMIT" => $arParams["LIST_OFFERS_LIMIT"], "SECTION_ID" => $arResult["VARIABLES"]["SECTION_ID"], "SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"], "SECTION_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["section"], "DETAIL_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["element"], "COMPARE_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["compare"], "COMPARE_NAME" => $arParams["COMPARE_NAME"], "DISPLAY_IMG_WIDTH" => $arParams["DISPLAY_IMG_WIDTH"], "DISPLAY_IMG_HEIGHT" => $arParams["DISPLAY_IMG_HEIGHT"], "SHARPEN" => $arParams["SHARPEN"], "ADD_SECTIONS_CHAIN" => "Y" ), $component ); ?> |
версия битрикс 11 ..
Помогите может кто и писал раньше либо стандартное решение есть ?