VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: rage76 on December 06, 2016, 17:38:20 PM

Title: Strikethrough on regular price
Post by: rage76 on December 06, 2016, 17:38:20 PM
Hi, I am on J 3.6.3 / VM 3.0.16

I want to show a Regular price with strikethrough &, a discounted price (inclusive of taxes)

Now, if I set the calculation rule for discount as "After tax", it works fine.

Whereas, I want the discount to be the price modifier "Before Tax". However, when I choose that, the regular price & the strikethrough goes away and I can only see the final price.

Desperately seeking help on this since I would prefer not to do this thru a core hack.
Title: Re: Strikethrough on regular price
Post by: GJC Web Design on December 06, 2016, 19:36:20 PM
It doesn't require a core hack

just some change in the logic in an over ride for

components\com_virtuemart\sublayouts\prices.php
Title: Re: Strikethrough on regular price
Post by: rage76 on December 07, 2016, 06:33:19 AM
Dear GJC Web Design

I am glad to know this can be achieved without a core hack.

Will it be possible for you to guide me on how to achieve this?

warm regards
Title: Re: Strikethrough on regular price
Post by: GJC Web Design on December 07, 2016, 11:55:56 AM
just look at the code in the sublayout.. theres not much of it

basically compare two prices .. if they aren't equal then a discount must have been applied so add a strikethru class to the lesser
Title: Re: Strikethrough on regular price
Post by: rage76 on December 07, 2016, 12:10:18 PM
Thanks again but I am not a programmer. So I guess I will have to get this done from someone who know PHP. Or if you would be kind enough to do this for me....I shall be grateful !!
Title: Re: Strikethrough on regular price
Post by: rage76 on December 10, 2016, 07:20:29 AM
Quote from: GJC Web Design on December 07, 2016, 11:55:56 AM
just look at the code in the sublayout.. theres not much of it

basically compare two prices .. if they aren't equal then a discount must have been applied so add a strikethru class to the lesser

@GJC Please help me resolve this. I am unable to bring my site online without it. rgds
Title: Re: Strikethrough on regular price
Post by: GJC Web Design on December 10, 2016, 11:07:19 AM
quite happy to do paid work..  if required email me