Answer the question
In order to leave comments, you need to log in
Tabs/Tabs inside the detailed description of the product. How to remove / rename / add?
Can you please tell me where can I remove the "Availability in stores"?
Similar tabs are inside each card for any owner of Bitrix. But where to rule them? Today, Google failed to generate the correct request.. :)
First, I need to remove the "Availability in stores"
Next, I would like to understand how to add a new tab for me and display the directory of the product catalog I
need
Answer the question
In order to leave comments, you need to log in
Tabs should be edited in the product card template. Approximately this is the path: /site.net/bitrix/templates/elektro_flat/components/bitrix/catalog/.default/bitrix/catalog.element/.default/template.php
Look for something like
<a href="#tab1"><span><?=GetMessage("CATALOG_ELEMENT_FULL_DESCRIPTION")?></span></a>
Usually, the settings to display or not display are placed in the component settings.
If your decision does not make it, then customize the template.
Screenshots from the standard template of the complex component "catalogue" of the online store.
/bitrix/templates/template/components/bitrix/catalog/catalog/bitrix/catalog.element/template/template.php
or
/bitrix/templates/template/components/bitrix/catalog.element/template.php
Description, Features, Reviews
Changed: active and in active - in tabs, also swapped blocks.
<?php if (!empty($arResult['DISPLAY_PROPERTIES']) || !empty($arResult['DETAIL_TEXT']) || $arParams['USE_REVIEW'] == 'Y') { ?>
<div class="tabs-content">
<div id="cat_el_tabs_title" class="cat_el_tabs_cont ">
<ul class="nav nav-tabs">
<?php if ('' != $arResult['DETAIL_TEXT']) {?>
<li class="tab_item active">
<a href="#spy-descr" data-toggle="tab"><?=Loc::getMessage('K_LABEL_DESC')?></a>
</li>
<?}?>
<?php if (!empty($arResult['DISPLAY_PROPERTIES'])) { ?>
<li class="tab_item">
<a href="#spy-props" data-toggle="tab"><?=Loc::getMessage('K_LABEL_PROPERTY')?></a>
</li>
<?}?>
<?if($arParams['USE_REVIEW'] == 'Y'){?>
<li class="tab_item">
<a href="#spy-reviews" data-toggle="tab"><?=Loc::getMessage('K_LABEL_REVIEW')?></a>
</li>
<?}?>
</ul>
</div>
<div id="cat_el_tabs_content" class="cat_el_tab_cont tab-content">
<?php if ('' != $arResult['DETAIL_TEXT']):?>
<div class="cat_el_tab tab-pane fade in active" id="spy-descr">
<?php if ('' != $arResult['DETAIL_TEXT']) {
if ('html' == $arResult['DETAIL_TEXT_TYPE']) {
echo $arResult['DETAIL_TEXT'];
} else {
echo '<p>'.$arResult['DETAIL_TEXT'].'</p>';
}
} ?>
</div>
<?endif;?>
<?php if (!empty($arResult['DISPLAY_PROPERTIES'])) { ?>
<div class="cat_el_tab tab-pane fade" id="spy-props">
<div class="properties-list flex-box">
<?php foreach ($arResult['PROPERTIES'] as &$arOneProp) {?>
<? if($arOneProp['VALUE'] && $arOneProp['VALUE'] != "Y"
&& $arOneProp["CODE"] != "CML2_TRAITS"
&& $arOneProp["CODE"] != "CML2_BAR_CODE"
&& $arOneProp["CODE"] != "CML2_ARTICLE"
&& $arOneProp["CODE"] != "PRODUCT_RATING"
&& $arOneProp["CODE"] != "PRODUCT_REVIEWS"
&& $arOneProp["CODE"] != "MORE_PHOTO"
&& $arOneProp["CODE"] != "YOUTUBE_VIDEO"
&& $arOneProp["PROPERTY_TYPE"] != "E"
){ ?>
<div class="info-line flex-box">
<div class="title"><?=$arOneProp['NAME']?></div>
<div class="value text-right">
<? echo (is_array($arOneProp['VALUE'])
? implode(' / ', $arOneProp['VALUE'])
: $arOneProp['VALUE']);?>
</div>
</div>
<? } ?>
<?
}
unset($arOneProp);
?>
</div>
</div>
<?php } ?>
<?if($arParams['USE_REVIEW'] == 'Y'){?>
<div class="cat_el_tab tab-pane fade" id="spy-reviews">
<div class="element_description">
<?php
?>
<?if ('Y' == $arParams['USE_COMMENTS']) {?>
<?$APPLICATION->IncludeComponent(
"krayt:emarket.comments",
"",
Array(
"IBLOCK_TYPE" => $arParams['IBLOCK_TYPE_ID'],
"IBLOCK_ID" => $arResult['IBLOCK_ID'],
"ELEMENT_ID" => $arResult["ID"],
"ELEMENT_CODE" => '',
"HLBLOCK_PROP_CODE" => $arParams['BLOG_HLBLOCK_PROP_CODE'],
"HLBLOCK_CR_PROP_CODE" => $arParams['BLOG_HLBLOCK_CR_PROP_CODE'],
"EMARKET_COMMENT_PREMODERATION" => "N",
"EMARKET_CUR_RATING" => $arResult['PROPERTIES']['PRODUCT_RATING']['VALUE'],
),
$component
);?>
<?}?>
</div>
</div>
<?}?>
</div>
</div>
<?}?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question