P
P
Philipp R.2018-06-01 00:03:08
1C-Bitrix
Philipp R., 2018-06-01 00:03:08

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

1 answer(s)
P
Philipp R., 2018-06-01
@RFV_online

<?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 question

Ask a Question

731 491 924 answers to any question