4

I'm working on a Magento store where there are lots of products with custom options. I noticed that when I sort category products by price, the displayed value (e.g. 300,00 EUR) is different from the one Magento uses to sort.

I'll try to explain...

  1. Product 1: price 100 EUR
  2. Product 2: price 90 EUR + 1 required custom option 20 EUR
  3. Product 3: price 130 EUR

I would like to see this sort ordeR:

  1. Product 2: 90 EUR
  2. Product 1: 100 EUR
  3. Product 3: 130 EUR

But I see:

  1. Product 2: 100 EUR
  2. Product 1: 90 EUR
  3. Product 3: 130 EUR

Is this the default Magento behavior? can I configure that from the backend area?

Thanks!

1

1 Answer 1

5

Yes, Magento sorts by the minimum price, which is stored in the price index table and takes required options into account.

In the default theme you should actually see "as low as 110 EUR" in the product list. To sort by product price alone, not minimum price, you would have to implement your own sort function.

Solution:

A solution without custom code would be to create a new attribute sort_price, make it sortable and enter the price that should be used for sorting for every product.

4
  • yes, @fschmengler,i am agree with you.
    – Amit Bera
    Commented Jun 30, 2015 at 6:51
  • You have remove my edit: :)
    – Amit Bera
    Commented Jun 30, 2015 at 7:10
  • I improved it :P Commented Jun 30, 2015 at 7:50
  • 1
    Thanks @fschmengler ! I decided to override the Product Resource Collection class to sort by "final_price" instead of "min_price". Commented Jul 2, 2015 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.