A
A
anriko2020-04-14 01:50:32
1C-Bitrix
anriko, 2020-04-14 01:50:32

Where is the $skuProperty['SHOW_MODE'] === 'PICT' parameter regulated in Bitrix?

did not find in the template where the parameter is assigned to ''PICT* (this is in the catalog in catalog.item for radio buttons with pictures ) only this

foreach ($arParams['SKU_PROPS'] as $skuProperty)
            {
              if (!isset($item['OFFERS_PROP'][$skuProperty['CODE']]))
                continue;

              $skuProps[] = array(
                'ID' => $skuProperty['ID'],
                'SHOW_MODE' => $skuProperty['SHOW_MODE'],
                'VALUES' => $skuProperty['VALUES'],
                'VALUES_COUNT' => $skuProperty['VALUES_COUNT']
              );
            }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
che7ovek, 2020-05-19
@anriko

Nowhere.
SHOW_MODE is set deep in the kernel in the CIBlockPriceTools::getTreeProperties function like this:

switch ($propInfo['PROPERTY_TYPE'])
{
    case Iblock\PropertyTable::TYPE_ELEMENT:
        $showMode = 'PICT';
        break;
     case Iblock\PropertyTable::TYPE_LIST:
         $showMode = 'TEXT';
         break;
     case Iblock\PropertyTable::TYPE_STRING:
         $showMode = (isset($fieldsList['UF_FILE']) ? 'PICT' : 'TEXT');
         break;
}

$fieldsList from the last branch exists only for Directories.
Those. the value of SHOW_MODE is only affected by the type of the property and is not regulated in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question