K
K
KoRNeT46RuS2019-02-28 15:35:17
1C-Bitrix
KoRNeT46RuS, 2019-02-28 15:35:17

Why is DISPLAY_PROPERTIES empty in trade offers?

Everything is fine in PROPERTIES, but DISPLAY_PROPERTIES is empty for each trade offer in the product card. In the settings of the component dripped everywhere included this only property. Can't beat him anyway. What is the jamb?

'PROPERTIES' => 
    array (size=2)
      'CML2_LINK' => 
        array (size=34)
          'ID' => string '80' (length=2)
          'IBLOCK_ID' => string '11' (length=2)
          'NAME' => string 'Элемент каталога' (length=31)
          'ACTIVE' => string 'Y' (length=1)
          'SORT' => string '500' (length=3)
          'CODE' => string 'CML2_LINK' (length=9)
          'DEFAULT_VALUE' => string '' (length=0)
          'PROPERTY_TYPE' => string 'E' (length=1)
          'ROW_COUNT' => string '1' (length=1)
          'COL_COUNT' => string '30' (length=2)
          'LIST_TYPE' => string 'L' (length=1)
          'MULTIPLE' => string 'N' (length=1)
          'XML_ID' => string 'CML2_LINK' (length=9)
          'FILE_TYPE' => string '' (length=0)
          'MULTIPLE_CNT' => string '5' (length=1)
          'LINK_IBLOCK_ID' => string '6' (length=1)
          'WITH_DESCRIPTION' => string 'N' (length=1)
          'SEARCHABLE' => string 'N' (length=1)
          'FILTRABLE' => string 'N' (length=1)
          'IS_REQUIRED' => string 'N' (length=1)
          'VERSION' => string '1' (length=1)
          'USER_TYPE' => string 'SKU' (length=3)
          'USER_TYPE_SETTINGS' => 
            array (size=9)
              'VIEW' => string 'A' (length=1)
              'SHOW_ADD' => string 'N' (length=1)
              'MAX_WIDTH' => int 0
              'MIN_HEIGHT' => int 24
              'MAX_HEIGHT' => int 1000
              'BAN_SYM' => string ',;' (length=2)
              'REP_SYM' => string ' ' (length=1)
              'OTHER_REP_SYM' => string '' (length=0)
              'IBLOCK_MESS' => string 'N' (length=1)
          'HINT' => string '' (length=0)
          '~NAME' => string 'Элемент каталога' (length=31)
          '~DEFAULT_VALUE' => string '' (length=0)
          'VALUE_ENUM' => null
          'VALUE_XML_ID' => null
          'VALUE_SORT' => null
          'VALUE' => string '558' (length=3)
          'PROPERTY_VALUE_ID' => string '14499' (length=5)
          'DESCRIPTION' => null
          '~VALUE' => string '558' (length=3)
          '~DESCRIPTION' => null
      'MODEL_SKU' => 
        array (size=34)
          'ID' => string '81' (length=2)
          'IBLOCK_ID' => string '11' (length=2)
          'NAME' => string 'Модель' (length=12)
          'ACTIVE' => string 'Y' (length=1)
          'SORT' => string '500' (length=3)
          'CODE' => string 'MODEL_SKU' (length=9)
          'DEFAULT_VALUE' => string 'standart' (length=8)
          'PROPERTY_TYPE' => string 'S' (length=1)
          'ROW_COUNT' => string '1' (length=1)
          'COL_COUNT' => string '30' (length=2)
          'LIST_TYPE' => string 'L' (length=1)
          'MULTIPLE' => string 'N' (length=1)
          'XML_ID' => null
          'FILE_TYPE' => string '' (length=0)
          'MULTIPLE_CNT' => string '5' (length=1)
          'LINK_IBLOCK_ID' => string '0' (length=1)
          'WITH_DESCRIPTION' => string 'N' (length=1)
          'SEARCHABLE' => string 'Y' (length=1)
          'FILTRABLE' => string 'Y' (length=1)
          'IS_REQUIRED' => string 'Y' (length=1)
          'VERSION' => string '1' (length=1)
          'USER_TYPE' => string 'directory' (length=9)
          'USER_TYPE_SETTINGS' => 
            array (size=5)
              'size' => int 1
              'width' => int 0
              'group' => string 'N' (length=1)
              'multiple' => string 'N' (length=1)
              'TABLE_NAME' => string 'b_hlbd_modeltp' (length=14)
          'HINT' => string '' (length=0)
          '~NAME' => string 'Модель' (length=12)
          '~DEFAULT_VALUE' => string 'standart' (length=8)
          'VALUE_ENUM' => null
          'VALUE_XML_ID' => null
          'VALUE_SORT' => null
          'VALUE' => string 'standart' (length=8)
          'PROPERTY_VALUE_ID' => string '14500' (length=5)
          'DESCRIPTION' => string '' (length=0)
          '~VALUE' => string 'standart' (length=8)
          '~DESCRIPTION' => string '' (length=0)
  'DISPLAY_PROPERTIES' => 
    array (size=0)
      empty

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ainur Valiev, 2019-08-28
@vaajnur

dude, this is a Bitrix bug. look here, in result_modifier.php add this code

$arResult["DISPLAY_PROPERTIES"] = array();
foreach ($arResult["PROPERTIES"] as $pid => &$arProp)
{
   if((is_array($arProp["VALUE"]) && count($arProp["VALUE"])>0) ||
   (!is_array($arProp["VALUE"]) && strlen($arProp["VALUE"])>0))
   {
        $arResult["DISPLAY_PROPERTIES"][$pid] = CIBlockFormatProperties::GetDisplayValue($arResult['ITEMS'], $arProp, '');
   }
}

$arResult['SHOW_OFFERS_PROPS'] = true;

E
Evgeny Generalov, 2020-12-31
@Generalof

Bitrix version 19.0 had a similar problem, it was solved by adding checkboxes in the property settings and when calling the DETAIL_OFFERS_PROPERTY_CODE parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question