Answer the question
In order to leave comments, you need to log in
How to get the name and path to all products in the infoblock, CMS 1C BITRIX?
Hello. Tell me how to get, using the 1C BITRIX API, the name and address * of all goods in the info block.
And if it is possible to get from the worthless category name and address.
* https://sale.pro/good/good/good/
Answer the question
In order to leave comments, you need to log in
<?php
if (CModule::IncludeModule("iblock")):
$iblock_id = 15;
# show url my elements
$my_elements = CIBlockElement::GetList (
Array("ID" => "ASC"),
Array("IBLOCK_ID" => $iblock_id),
false,
false,
Array('ID', 'NAME', 'DETAIL_PAGE_URL')
);
while($ar_fields = $my_elements->GetNext())
{
echo "<pre>" . urldecode($ar_fields['NAME']) . </pre>;
echo "<pre>" . urldecode($ar_fields['DETAIL_PAGE_URL']) . "</pre>";
}
endif;
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question