M
M
MaxKondratenko2015-05-29 13:56:11
1C-Bitrix
MaxKondratenko, 2015-05-29 13:56:11

The catalog.element component, when displaying the article, wraps it in dt dd, where can I change this?

I noticed something to look for, I edit the standard template of the catalog.element component and when I display the article (echo $arItemIDs['DISPLAY_PROP_DIV']) it wraps it in dt dd which doesn't suit my layout... but I can't find where it does it , in theory it should be in script.js, but I didn’t find it there either ... who can tell me where he does it, I’ve been fighting for an hour and haven’t found it? here is the piece

<? if (!empty($arResult['DISPLAY_PROPERTIES']) || $arResult['SHOW_OFFERS_PROPS'])
                  {
                ?>
                <?
                    if (!empty($arResult['DISPLAY_PROPERTIES']))
                    {
                ?>
                <?
                      foreach ($arResult['DISPLAY_PROPERTIES'] as &$arOneProp)
                      {
                ?>
                      <div class="product-attr-text"><? echo $arOneProp['NAME']; ?>: <span><?
                        echo (
                          is_array($arOneProp['DISPLAY_VALUE'])
                          ? implode(' / ', $arOneProp['DISPLAY_VALUE'])
                          : $arOneProp['DISPLAY_VALUE']
                        ); ?></span></div><?
                      }
                      unset($arOneProp);
                ?>
                <?
                    }
                    if ($arResult['SHOW_OFFERS_PROPS'])
                    {
                ?>
                    <div class="product-attr-text"id="<? echo $arItemIDs['DISPLAY_PROP_DIV'] ?>" style="display: none;"></div>
                <?
                    }
                ?>
                <?
                  }
                ?>

and even when it displays an additional description of the product, it also creates a list there ... which also does not suit me ....
<?
        if ('' != $arResult['DETAIL_TEXT'])
{
?>
  <div class="bx_item_description">
    <p><? echo GetMessage('FULL_DESCRIPTION'); ?></p>
<?
  if ('html' == $arResult['DETAIL_TEXT_TYPE'])
  {
    ?><p><?
    echo $arResult['DETAIL_TEXT'];
    ?></p><?
  }
  else
  {
    ?><p><? echo $arResult['DETAIL_TEXT']; ?></p><?
  }
?>
  </div>
<?
}
?>

again, I can’t find where he does it .... thanks in advance to everyone, if in script.js, then apparently you need to look harder ...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Zachinalov, 2015-05-29
@SanDiesel

in dt wraps by default, but in your example you have replaced these blocks with your own divs in template.php...so everything should work. Have you updated the cache? ... And I also remind you that it is not recommended to edit the standard templates, there will be problems with updates. You need to fix only the copied components from the default. If you're doing it right, then check to see if you provided your template name in the call, there might still be a problem.

M
MaxKondratenko, 2015-05-31
@MaxKondratenko

Naturally, I edit the copied components, or rather the component templates. Yes, I updated the cache, the question is, what is this part

<?   if ($arResult['SHOW_OFFERS_PROPS'])
                    {
                ?>
                    <div class="product-attr-text"id="<? echo $arItemIDs['DISPLAY_PROP_DIV'] ?>" style="display: none;"></div>
                <?
                    }
?>

is replaced by
<div class="product-attr-text" id="bx_117848907_322_sku_prop" style=""><dt>Артикул</dt><dd>177-79-05</dd></div>

I can't find the place where it forms it...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question