Hello,
Can you try this code :
$productClass = hikashop_get('class.product');
$categories = $productClass->getCategories($this->element->product_id);
if(in_array('158',$categories) || in_array('159',$categories) ) {
echo '<div class="size_guide">
<a href="ismatavimai" target="_blank"><img src="images/ismatavimai/sizeicon.png" data-placement="top" data-toggle="hk-tooltip" data-original-title="Išmatavimų paaiškinimai"></a>
</div>';
}
Please note that :
-
!in_array('158',$categories) means, that the following command will be execute
ONLY if the Id =
158 or 159 isn't found, so in this last code I provide your div will be display only for Id =
158 or
159
- '
||' means
OR, '
&&' means
AND, and so this condition won't be possible in your product page,
unless a product have the
158 AND 159 categories Id.
Hope this will fit your needs.
Regards.