Answer the question
In order to leave comments, you need to log in
How to hide a product whose picture is called "000.jpg"?
<?
/**
* @var $APPLICATION CMain
*/
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php");
$APPLICATION->SetPageProperty("title", "Каталог кровельных материалов");
$APPLICATION->SetPageProperty("keywords", "кровля, черепица");
$APPLICATION->SetPageProperty("description", "Широкий выбор кровли в Пятигорске и Новопавловске.");
$APPLICATION->SetTitle("Кровля.");
?><div class="catalog-page shingles">
<div class="row">
<div class="large-9 medium-12 columns">
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.section.list",
"item_list",
Array(
"ADD_SECTIONS_CHAIN" => "Y",
"CACHE_GROUPS" => "N",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"COUNT_ELEMENTS" => "Y",
"IBLOCK_ID" => 1,
"IBLOCK_TYPE" => "catalog",
"SECTION_CODE" => $_REQUEST['SECTION_CODE'],
"SECTION_FIELDS" => array("ID","CODE",""),
"SECTION_ID" => $_REQUEST["SECTION_ID"],
"SECTION_URL" => "#SITE_DIR#/catalog/#SECTION_CODE#/",
"SECTION_USER_FIELDS" => array("",""),
"TOP_DEPTH" => 2,
)
);
?>
</div>
<div class="large-3 float-right columns">
<? require '.aside.php' ?>
</div>
</div>
</div>
<br><? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php"); ?>
Answer the question
In order to leave comments, you need to log in
You need to open the component code, you can, for example, the result_modifier.php file, and do the following:
1) Print the incoming $arParams and $arResult array
2) View the exact array key with the element activity parameter and the detailed picture.
3) Write something like the following code (the exact interpretation will depend on the keys in $arParams and $arResult )
foreach ($arResult as $arItem)
if ($arItem['DETAIL_IMAGE']['NAME'] == '000.jpg') {
$arParams['ACTIVE'] == 'N';
}
How to hide a product whose image is called "000.jpg"
$APPLICATION->IncludeComponent("bitrix:catalog.section.list")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question