The site has a "comparison" of products when you go to the product comparison page does not display the picture announcement, the no-image class is used.

if (isset($arItem['FIRST_PIC'][0])) { ?><img class="image" src="<?=$arItem['FIRST_PIC'][0]['RESIZE'][0]['src']?>" alt="<?=$arItem['FIRST_PIC'][0]['ALT']?>" title="<?=$arItem['FIRST_PIC'][0] ['TITLE']?>" /><? } else { ?><img class="image" src="<?echo SITE_TEMPLATE_PATH?>/img/noimg.png" title=" <? echo $arItem['NAME']; ?>" alt="<? echo $arItem['NAME']; ?>"><? } 
  • and what you have here $ arItem ['FIRST_PIC']? - Oleksandr
  • Well, did you see why you did not get the necessary data in $arItem['FIRST_PIC'][0] ? figure it out and it will work out - Nikolaj Sarry

1 answer 1

Obviously, because $arItem['FIRST_PIC'][0] empty