Hi,
Filtering/ordering by price is indeed a lot slower than other filtering.
That's because there is a lot of calculation necessary to have a filtering which works not too bad:
- when you have several currencies, the product prices can be in some currencies only, and the system converts them automatically, so the prices of all the products on the listing have to be converted (when necessary) to the current currency.
- Filtering has to be done based on the user group of the user to only use relevant prices
- prices can have taxes applied to them and thus, again, the price with tax has to be calculated dynamically for all the products of the listing.
- prices might not be directly in the main product, but only in the variants of the products, so that also has to be taken into account.
Because of all this, the queries to handle the price filtering/ordering get very slow. Of course, you can simplify them in the /administrator/components/com_hikashop/classes/filter.php file. If you're a developer it shouldn't be a problem.
But a simpler solution is to just create a custom field of the table "product" and enter the price you want the order/filter to be based on for each product in that custom field. Then, you'll be able to base your filter on that custom product field and it will be really fast.
To make it simple to setup, you can configure a mass action via the menu System>Mass actions to automatically populate your custom product field with an operation {price.price_value} in an action "update the values" of your mass action.