VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: bpolinski on March 01, 2017, 08:14:44 AM

Title: Sort by discounted price
Post by: bpolinski on March 01, 2017, 08:14:44 AM
Hi,

I want order by price to sort by discounted price, not without discount. How to do this?

http://rozwojczytelnictwa24.pl/index.php/pl/atlasy?virtuemart_manufacturer_id=0&orderby=product_price&dir=ASC

edit: I just saw that there are unsolved problems like this already:

https://forum.virtuemart.net/index.php?topic=118092.msg399998#msg399998
https://forum.virtuemart.net/index.php?topic=107306.msg358671#msg358671

Really there is no solution? ;(
Title: Re: Sort by discounted price
Post by: balai on March 01, 2017, 13:08:35 PM
There is no solution.
At least not 1 that can stand in a production shop with a serious amount of products.

The reason: The final price is calculated on the fly when the product is called.
That means that a possible solution should call all the products of a page and sort them again, beyond the sorting happening by the sql query execution.