Answer the question
In order to leave comments, you need to log in
How to display only a short/full description of a product in bitrix?
Question for bitrix connoisseurs, there is a code (in the catalog template):
<?$ElementID=$APPLICATION->IncludeComponent(
"bitrix:catalog.element",
"",
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"PROPERTY_CODE" => $arParams["DETAIL_PROPERTY_CODE"],
"META_KEYWORDS" => $arParams["DETAIL_META_KEYWORDS"],
"META_DESCRIPTION" => $arParams["DETAIL_META_DESCRIPTION"],
"BROWSER_TITLE" => $arParams["DETAIL_BROWSER_TITLE"],
"BASKET_URL" => $arParams["BASKET_URL"],
"ACTION_VARIABLE" => $arParams["ACTION_VARIABLE"],
"PRODUCT_ID_VARIABLE" => $arParams["PRODUCT_ID_VARIABLE"],
"SECTION_ID_VARIABLE" => $arParams["SECTION_ID_VARIABLE"],
"DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"],
"CACHE_TYPE" => "N",
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
"SET_TITLE" => $arParams["SET_TITLE"],
"SET_STATUS_404" => $arParams["SET_STATUS_404"],
"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"],
"PRICE_VAT_SHOW_VALUE" => $arParams["PRICE_VAT_SHOW_VALUE"],
"LINK_IBLOCK_TYPE" => $arParams["LINK_IBLOCK_TYPE"],
"LINK_IBLOCK_ID" => $arParams["LINK_IBLOCK_ID"],
"LINK_PROPERTY_SID" => $arParams["LINK_PROPERTY_SID"],
"LINK_ELEMENTS_URL" => $arParams["LINK_ELEMENTS_URL"],
"USE_PRODUCT_QUANTITY" => "Y",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"OFFERS_CART_PROPERTIES" => $arParams["OFFERS_CART_PROPERTIES"],
"OFFERS_FIELD_CODE" => $arParams["DETAIL_OFFERS_FIELD_CODE"],
"OFFERS_PROPERTY_CODE" => $arParams["DETAIL_OFFERS_PROPERTY_CODE"],
"OFFERS_SORT_FIELD" => $arParams["OFFERS_SORT_FIELD"],
"OFFERS_SORT_ORDER" => $arParams["OFFERS_SORT_ORDER"],
"ELEMENT_ID" => $my_id,
"ELEMENT_CODE" => $arResult["VARIABLES"]["ELEMENT_CODE"],
"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"],
),
$component
);?>
Answer the question
In order to leave comments, you need to log in
open the folder with templates, find the catalog template there, find the bitrix:catalog.element component template in it. template.php file
and output:
announcement description: <?=$arResult["PREVIEW_TEXT"]?>
detailed description: <?=$arResult["DETAIL_TEXT"]?>
title: <?=$arResult["NAME"] ?>
URL of the preview image: <?=$arResult["PREVIEW_PICTURE"]["SRC"]?>
print the contents of the array to the heap via print_r($arResult) and see what it contains.
upd: if you need to display the element fields after the result of the work of any component, you can either place this component in the bitrix:catalog.element template, or use the getlist function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question