Posted - 04/30/2014 : 15:27:50
I don't know if this has been shown here before, but I have just worked out a way to display a second 'promo banner' image over the top of the small product image. I think this is a really effective way to highlight special offers or new products etc.
It is quite simple really.. First of all create a promo / special offer image of a suitable size to display over the product image and save it with a transparrent background.
Then, on the product admin page simply add the following code immediately after the small product image url.
" /><img src="images/special.png" class="specialimage
Then you just need to set up the 'specialimage' css class to adjust the position of the image so it is correctly aligned over the product image. I used the following, but this will need to be adjusted depending on the size of the images used.
.specialimage { position: relative; top: -150px; left: -35px; z-index: 10; margin-bottom: -70px; }
On my site the the product images displayed on the cross-sell on the proddetail page and cart product images are scaled to a smaller size so I added the css class to those pages and adjusted the position as necessary.
I should add that I am no expert so if anyone is thinking of trying this I would advise thorough testing.
|