I have this code which is pretty easy, it adds an image to the side of another image depending on a boolean magento attribute.
But because we are running a ecommerce store, it would be more attractive to the users top put the image on top of the product. To combine them together.
I wonder if with PHP its possible to do that.
Somebody suggested to do with CSS overlying images?
<div class="product-img-box">
<?php echo $this->getChildHtml('media') ?>
</div>
<?php $Deal = $_product->getResource()->getAttribute('deal')->getFrontend()->getValue($_product);?>
<?php if($Deal == 'Yes'){ ?>
<img src="<?php echo $this->getSkinUrl('images/icon-deal.gif') ?>" >
<?php } ?>
Try something like this:
CSS
PHP