Friday , December 20 2024

Bitrix

CMS Bitrix – articles, how-to-fix notes, fast solutions

How to display a product property in Bitrix only for a specific user group

By default, the properties are displayed, for example, in this file /bitrix/templates/template/components/bitrix/news.detail/catalog/template.php like this: <?if($arResult["PROPERTIES"]["test123"]["VALUE"]):?> <div class="project-top__parameter-item"> <div class="project-top__parameter-name"> <?=$arResult["PROPERTIES"]["test123"]["NAME"]?> </div> <div class="project-top__parameter-line"></div> <div class="project-top__parameter-size"> <?=$arResult["PROPERTIES"]["test123"]["VALUE"]?> </div> </div> <?endif;?> where test123 is a product property. If you need to hide this property for all groups, for example, except for Admins …

Read More »

Include the file and display the value if it is specified in this file

This method was created for SEO edits on the Bitrix site (generated h1 values were entered in the file and displayed in the template). Today I returned to this solution for canonical edits, here is the code and description: <?php include($_SERVER['DOCUMENT_ROOT']."/seo.php");  if(isset($seoh1) AND $seoh1!='') {echo $seoh1;} else {echo $heading_title;} ?> …

Read More »

Title for bitrix pagination

I will not describe why this is necessary, I will only publish a ready-made solution. else echo $APPLICATION->ShowProperty("meta_title"); if (isset($_GET['PAGEN_1']) && $_GET['PAGEN_1']!=1) { echo " Page ".$_GET['PAGEN_1']; } if (isset($_GET['PAGEN_2']) && $_GET['PAGEN_2']!=1) { echo " Page ".$_GET['PAGEN_2']; } if (isset($_GET['PAGEN_3']) && $_GET['PAGEN_3']!=1) { echo " Page ".$_GET['PAGEN_3']; } The disadvantage …

Read More »

Question marks in the Bitrix admin panel

After installing the purchased extension “Multiregionality from Intec”, a problem was discovered in the admin panel – for regions, all fields instead of Cyrillic are displayed with question marks, similarly when displaying a component on the site. According to the recommendations of Bitrix, a system check was made, and everything …

Read More »