VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: aliziaye on December 10, 2020, 10:39:49 AM

Title: Clear scratched price (discounted)
Post by: aliziaye on December 10, 2020, 10:39:49 AM
Hello to all
Please see the attached photo
After applying the price to the product, it shows the price twice and draws a line on one of them
How can I clear the black price?
Please guide me so that I can translate your answers in Google because I do not know English
Title: Re: Clear scratched price (discounted)
Post by: AH on December 10, 2020, 10:49:54 AM
That will be because VM sees a difference in prices in the price display template - and treats it as if there were a discount.

This is probably because of price rounding and decimal places.

\components\com_virtuemart\sublayouts\prices.php

Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 10, 2020, 11:19:39 AM
What changes should I make to the prices.php file?
Title: Re: Clear scratched price (discounted)
Post by: AH on December 10, 2020, 11:38:52 AM
You may not need to

Show your price configuration settings

/administrator/index.php?option=com_virtuemart&view=config

Pricing tab
Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 10, 2020, 11:50:42 AM
here you are
Title: Re: Clear scratched price (discounted)
Post by: AH on December 10, 2020, 11:56:12 AM
That looks fine

But I now see you have a custom template - which means you are using display changes to the core files

Turn of the template override to see what happens when you do that - this will show if it is the template that is at fault
Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 10, 2020, 12:04:26 PM
Do you mean this?
Title: Re: Clear scratched price (discounted)
Post by: AH on December 10, 2020, 12:11:10 PM
Can you post an url for me to take a look ?

Quickview is not core - it is either an override template and/or plugin

I notice that there is no scratched price - but this is a product view and not a category view
Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 13, 2020, 07:31:53 AM
http://kanooneabzar.com/rotary-encoder/encoder-ateksensor-ars-s-37/ars-s-37-500-hpl-6-3m-y-6-c-detail
here you are
Title: Re: Clear scratched price (discounted)
Post by: AH on December 13, 2020, 11:13:58 AM
This may be caused by your VM configuration - set Round Only Display - On

Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 13, 2020, 15:52:43 PM
This is my settings
Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 15, 2020, 12:40:11 PM
What should I do?
Title: Re: Clear scratched price (discounted)
Post by: jenkinhill on December 15, 2020, 12:58:27 PM
Try unsetting the display of "New baseprice modified by chosen product variant"  - the page code suggests that this is the strikethru price displayed.

Or maybe use CSS to hide the value, eg:

.PricebasePriceVariant {
      display: none;
}
Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 15, 2020, 13:50:37 PM
i unset "New baseprice modified by chosen product variant" And the problem was solved But if I discount the product, no one will notice the discount
Title: Re: Clear scratched price (discounted)
Post by: AH on December 15, 2020, 14:33:58 PM
yes they will - try it!
Title: Re: Clear scratched price (discounted)
Post by: aliziaye on December 16, 2020, 06:26:01 AM
Thank you all