asterisco Posted June 6, 2020 Share Posted June 6, 2020 Hello, Does anybody know a way without modifying the core code (but, instead, overriding/using a hook) to force the search results to leave the products of out stock at the bottom. I know this is done in Faceted Search, but as you may know, Faceted Search is not applied in the regular search (ie, the one you fire when you search in the header searchbox). Thanks in advance Link to comment Share on other sites More sharing options...
asterisco Posted June 11, 2020 Author Share Posted June 11, 2020 Hi ndiaga. Thanks for your answer. Can you please be more specific? Remember that what I want is not sort by quantity, but allow the user to sort by itw own criteria but always having products out of stock at the end. I already achieved this overriding a big part of the search module, but a cleaner way would be great. Thanks! Link to comment Share on other sites More sharing options...
asterisco Posted June 11, 2020 Author Share Posted June 11, 2020 That looks excellent, but are you having into account the pagination stuff? Sorry maybe I'm missing something but I don't understand how can I handle this from front side. Link to comment Share on other sites More sharing options...
asterisco Posted June 12, 2020 Author Share Posted June 12, 2020 I'm still confused. In the template I'll just have the X items (being X the size of the page), not all the elements, so the only thing I can achieve is to have the items without stock at the bottom of THAT page. That would be good only if the search results just have one page. Of course, that's not what I need: what I need is to have the out of stock products in last pages if there are several. I don't know if I'm not being clear enought with my request or I am completely missing your point. Sorry about that, and many thanks for your patience! Link to comment Share on other sites More sharing options...
asterisco Posted June 12, 2020 Author Share Posted June 12, 2020 Thanks for the offer, but I can't afford it Anyway, I'll try to figure out what is what you're suggesting and see if I can finally make it. Again, thanks for your help! Link to comment Share on other sites More sharing options...
x01 Posted July 8, 2020 Share Posted July 8, 2020 Hello, Can I ask if you solve your problem? I'm trying to keep out of stock product at the end of category listing but only thing I get is remove products with quantity 0 (but then I have empty spaces on page). Best regards, Janusz Link to comment Share on other sites More sharing options...
asterisco Posted July 8, 2020 Author Share Posted July 8, 2020 Hi x01. For the Category page is simple enough if you have Faceted Search module activated. One of its options is keeping the out of stock products at the end. Take a look and let me know if you have any other doubt. 1 Link to comment Share on other sites More sharing options...
x01 Posted July 8, 2020 Share Posted July 8, 2020 OH! I've missed that. Couple days I'm trying figure it out inside *.tpl files.. 🤣 Now it's as I've wanted.. Thank you very much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now