There are two InfoBlock single Directory called the second product Brands.
In the first are stored the products of 1C, the second places for the brands name and logo.
The Directory has a property: Trade mark character code ATT_TRADEMARK
The InfoBlock Brands in the Name field, put the same name with Bredli in the Catalog, in the properties box, brandExample:
Brand with character code ATT_TRADEMARK = RIEKER
and the Brand name = RIEKER
With the help of CIBlockElement::GetList trying to compare them in a detailed card of the product and display the page link of the brand in the InfoBlock Brands may not be the brand which is uploaded to the Catalog, this makes a condition which displays just the name, but it turns out or display link item if there is one brand in info. A brand, a product if such nonsense is not present in INF. Brand brand disappears completely or take the brand but the be links.
tell me what's wrong.
IBLOCK_ID"=> 4 is an InfoBlock Brands
$arSelect = Array("CODE", "NAME");
$arFilter = Array("IBLOCK_ID"=--> 4, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y");
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>5010), $arSelect);
while($ob = $res->GetNextElement())
$arFields = $ob->GetFields();
if($arResult["PROPERTIES"]["ATT_TRADEMARK"]["VALUE"] == $arFields["NAME"])
echo "<a href="/brend/brend-s/".$arFields["CODE"]."/">".$arResult['PROPERTIES']['ATT_TRADEMARK']['VALUE']."</a>";
//If there is specified below, if it displays the brands all the products without links, if it is clear that the brand is present in only a product which is nonsense, and a product whose brand is not present, it is not
if(!$arResult["PROPERTIES"]["ATT_TRADEMARK"]["VALUE"] == $arFields["NAME"])
Hope I described clearly.