I kinda know this should be a fairly simple thing to do, but in my opencart 2.3.0.2 webshop, I want to display the category image on product pages.
But i cant find how to retrieve the image.... At this moment i have this piece of code :
<div class="catthumb">
<?php if ($thumb) { ?>
<div class="category-bg" style="
background: url('<?php echo $thumb; ?>') no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.<?php echo $thumb; ?>', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $thumb; ?>', sizingMethod='scale')";">
</div>
<?php } ?>
The following code doesn't do the trick.. Ofcourse i've changed the variable along with the code.
if ($category_info) {
if ($category_info['image']) {
$this->data['thumbcat'] = "../image/".($category_info['image']);
} else {
$this->data['thumbcat'] = '';
}
}
But this displays the poduct thumb, instead of the category thumb, the product belongs to.
So the question is how to get the category image there?
Thanks in advance!