This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Получить товары сгруппированные по свойству PROPERTY_BREND_TOVARA | |
$arFilter = Array("IBLOCK_ID"=>49, "ACTIVE"=>"Y"); | |
$arGroupBy=Array("PROPERTY_BREND_TOVARA"); | |
$db_list = CIBlockElement::GetList(Array("PROPERTY_BREND_TOVARA"=>"ASC"), $arFilter, $arGroupBy); | |
while($ar_result = $db_list->GetNext()) | |
{ | |
var_dump($ar_result['PROPERTY_BREND_TOVARA_VALUE']); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Получаем значение свойств товара | |
$db_props = CIBlockElement::GetProperty( | |
MAIN_CATALOG_IB_ID, | |
$ob->fields['ID'], | |
array("sort" => "asc"), | |
Array("CODE" => "BREND_TOVARA") | |
); | |
if ($ar_props = $db_props->Fetch()) | |
$PROP = $ar_props["VALUE"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$arSelect = [ | |
"ID", | |
"NAME", | |
"PROPERTY_BREND_TOVARA" | |
]; | |
$arFilter = [ | |
"IBLOCK_ID" => MAIN_CATALOG_IB_ID, | |
"ACTIVE" => "Y", | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$arFilter = [ | |
"IBLOCK_ID" => MAIN_CATALOG_IB_ID, | |
"ACTIVE" => "Y", | |
]; | |
$iCount = CIBlockElement::GetList(false, $arFilter, array()); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ОШИБКА | |
TypeError: window.History.pushState is not a function | |
Нужно сделать History с маленткой буквы!!! | |
JCSmartFilter.prototype.filterCatalog = function (url, set_disabled) | |
{ | |
if( window.History.enabled || window.history.pushState != null ){ | |
window.history.pushState( null, document.title, url ); | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Для компонента: | |
bitrix:catalog | |
"AJAX_FILTER_CATALOG" => "N", - Отключить Ajax умный фильтр | |
2. Для компонента: | |
"AJAX_FILTER_CATALOG" => "N", - Отключить Ajax умный фильтр | |
И не забыть в умном фильтре поменять шаблон: | |
"bitrix:catalog.smart.filter", | |
"main", без Ajax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adm-7-chasov-edit\bitrix\templates\aspro_next\components\bitrix\catalog.smart.filter\main\script.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
компонент bitrix:catalog.section | |
1. Включить опцию: | |
"SHOW_ALL_WO_SECTION" => "Y", | |
2. Заполнить опции для ID блоков: | |
"IBLOCK_ID" => "49", | |
"IBLOCK_TYPE" => "1c_catalog", | |
3. Обязательно сделать пустым секцию | |
"SECTION_CODE" => "", | |
"SECTION_ID" => "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); ?> | |
<? ob_start(); ?> | |
<?$APPLICATION->IncludeComponent( | |
"bitrix:catalog.smart.filter", | |
".default", | |
array( | |
"COMPONENT_TEMPLATE" => ".default", | |
"IBLOCK_TYPE" => "1c_catalog", | |
"IBLOCK_ID" => "49", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Фильтр должен располагаться над catalog.section | |
2. Параметр: | |
"FILTER_NAME" => "NEXT_SMART_FILTER", | |
Дожен быть одинаковым у: | |
bitrix:catalog.smart.filter | |
bitrix:catalog.section | |