VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: psm on November 06, 2018, 16:01:38 pm

Title: Label in product image with price discountin %
Post by: psm on November 06, 2018, 16:01:38 pm
Dear all,
please is it possible to do label with price discount in % and stick it to image.

I would like to do it automatically for all products which have discount (with usage of 0% VAT).

I am suprised that there is not any extension for this with using of default template.

Thank you very much
Title: Re: Label in product image with price discountin %
Post by: GJC Web Design on November 06, 2018, 16:13:03 pm
in the image template use the product price object to test for a discount
if there is a discount just show an absolute positioned div with the % from above in it
Title: Re: Label in product image with price discountin %
Post by: psm on November 06, 2018, 17:36:04 pm
Please, where can I find price object?

And should I add it to this code?

Code: [Select]

<div class="main-image">
<div class="product-details-image-handler">
<?php
echo $image->displayMediaFull("",true,"rel='vm-additional-images'");
?>

</div>
<div class="clear"></div>
</div>

Thank you
Title: Re: Label in product image with price discountin %
Post by: psm on November 07, 2018, 11:03:45 am
Can anybody help me?

Thanks,