-1

I'm trying to change the way my default "Best Value" view works for a category (both list/grid views) so that items which are "in stock" appear first and then out of stock items last. I have successfully changed the default sort order for search results as well as advanced searches but still no luck with simply the "Best Value" sorted by "in stock" first.

marked as duplicate by Sander Mangel, Flyingmana, philwinkle, Keyul Shah, Amit Bera Nov 8 '14 at 3:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    whathaveyoutried.com ? Theory is: hook into the event of the category page and add a sortBy. Is this enough? Just say no and I'll explain ... tomorrow. – Fabian Blechschmidt Oct 13 '13 at 19:57
  • No ... please explain further when you get a chance - Thank you! – riskywebmaster Oct 13 '13 at 21:02
  • @FabianBlechschmidt if you ever fancy writing this up feel free :) – David Manners Jul 30 '14 at 14:11
  • Please remind me in two weeks, after my vacation <3 – Fabian Blechschmidt Jul 30 '14 at 14:29
  • @FabianBlechschmidt ok so more than two weeks but still :) – David Manners Aug 14 '14 at 8:15
0

here is the answer:

http://markustenghamn.com/show-products-longer-stock-magento

It works fine for me, the only problem is when you change the sort order by price.

I hope this helps.

  • I already have this edit in place which is a fix for sorting search results, however when simply browsing categories this does not fix the problem. This is what I meant when I said the following in my original post "I have successfully changed the default sort order for search results as well as advanced searches but still no luck with simply the 'Best Value' sorted by 'in stock' first." Any other ideas on how to solve this? – riskywebmaster Oct 29 '13 at 5:00
0

You can use this free extension to accomplish this. It also doesn't brake sorting by price. All instructions is at the github page:

https://github.com/MaximusDecimus/ShowInStockFirst

  • Maybe if you share some of how your extension works here that might help decide if the extension answers the question. – David Manners May 10 '14 at 11:17
0

For "best value" you need to combine two sorting options, not just replace one with another.

So in the toolbar block check the current order and if it is "position" add the second "in stock" sorting order to the product collection.

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