Order by Cheapest Price

  • Posts: 214
  • Thank you received: 1
10 years 10 months ago #139957

Hi Guys,

So I've done a search and found several answers but they seem to be 1 to 3 years old, so I just wanted to make sure there isn't an updated way to do this.

Basically I have my search page here www.craftkeg.com/index.php/beer-finder and what I would like to do is display the products by price from cheapest to most expensive, what is the easiest way to do this?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #139995

Hi,
I think that the solution can be to edit the content menu which have the ID number 105 and use the "Ordering field".

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 1
10 years 10 months ago #140072

Hi Mohamed, the content module for this page is 605, the ID for 105 is for my Products listing.

I have the Ordering field set to 'product_page_title' as you can see, but the only option I can see which applies to the price is 'price_price_percentage' , but that doesn't seem to sort it into any logical order that I can see.

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 1
10 years 10 months ago #140081

Well for now I've created a 'sort by price' filter, but I would like to know for future reference how to sort modules by price.

Please Log in or Create an account to join the conversation.

  • Posts: 82909
  • Thank you received: 13379
  • MODERATOR
10 years 10 months ago #140145

Hi,

There is no option to sort by price the products by default. The product_price_percentage column is to specify a percentage for the price of the variants compared to the price of the main product. So selecting it won't do anything logical.
It's really complex to properly sort the products by price as the prices are calculated dynamically on each page for each user and these dynamic calculations (taxes, discounts, user group, etc) cannot be done in the mysql query which handle the sorting.
It will require to create a price pre calculation table and that's a big job to undertake.

Please Log in or Create an account to join the conversation.

Time to create page: 0.048 seconds
Powered by Kunena Forum