A
A
Andrey Eskov2017-06-01 10:20:41
1C-Bitrix
Andrey Eskov, 2017-06-01 10:20:41

How to change the output of the properties (Wrapper) of the product?

Good afternoon. Straight to the point. There is a standard catalog component. It contains the detail output component of the element.
So, while editing the product card, I ran into a problem. properties of the product and trade offers are displayed in the characteristics. So in the template, I changed the output of the product properties to a plate, but the properties are still displayed in the dl tag.
Judging by the code below, the tag substitution goes to js

<?php if (!empty($arResult['DISPLAY_PROPERTIES']) || $arResult['SHOW_OFFERS_PROPS']):?>
                            <div class="product-item-detail-tab-content" data-entity="tab-container" data-value="properties">
                                <table>
                                    <?php if (!empty($arResult['DISPLAY_PROPERTIES'])):?>
                                        <?php foreach ($arResult['DISPLAY_PROPERTIES'] as $property):?>
                                            <tr>
                                                <td><?=$property['NAME']?></td>
                                                <td><?=(is_array($property['DISPLAY_VALUE']) ? implode(' / ', $property['DISPLAY_VALUE']) : $property['DISPLAY_VALUE'])?></td>
                                            </tr>
                                            <?php endforeach;?>
                                        <?php unset($property);?>
                                    <?php endif;?>
                                </table>
                                <?php if ($arResult['SHOW_OFFERS_PROPS']):?>
                                    <dl class="product-item-detail-properties" id="<?=$itemIds['DISPLAY_PROP_DIV']?>"></dl>
                                <?php endif;?>
                            </div>
                        <?php endif;?>

Result
<dl class="product-item-detail-properties" id="bx_117848907_26_sku_prop"><dt>Артикул</dt><dd>AY-RT900</dd></dl>

In script.js I found a line that, in my opinion, makes this wrapper
if (this.obSkuProps)
          {
            if (!this.offers[index].DISPLAY_PROPERTIES)
            {
              BX.adjust(this.obSkuProps, {style: {display: 'none'}, html: ''});
            }
            else
            {
              BX.adjust(this.obSkuProps, {style: {display: ''}, html: this.offers[index].DISPLAY_PROPERTIES});
            }
          }

And more specifically
BX.adjust(this.obSkuProps, {style: {display: ''}, html: this.offers[index].DISPLAY_PROPERTIES});

Can you tell me how to make a sign here too?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question