Close

How to show all out of stock products in bottom of the results

prasad1709
one year ago
#13822 Quote
Avatar
  • 1
PM
Hi,


I would like to show all out of stock products in my categories pages, search results pages, product tags page, filters applied pages.

What is the customization required to achieve this.

We have a many out of stock products at this time in our store.  Instead of deleting the products we would like to move all these products at bottom in all results pages.

It would be really help us if you can reply early with positive response.

Thanks in advance.
Boyko
one year ago
#13828 Quote
Avatar
  • Moderator
  • 1413
PM
prasad1709 wrote:
Hi,


I would like to show all out of stock products in my categories pages, search results pages, product tags page, filters applied pages.

What is the customization required to achieve this.

We have a many out of stock products at this time in our store.  Instead of deleting the products we would like to move all these products at bottom in all results pages.

It would be really help us if you can reply early with positive response.

Thanks in advance.


Hi prasad1709,

By default nopCommerce shows out of stock products unless you have unpublished them.
If you want to show the out of stock products at the bottom you can change their display order in the category/manufacturer mappings as nopCommerce uses it for the default sort option which is "By position". So you can write a script to change all mappings for the out of stock products and update the Display Order to be different than the default one which is 1.

Hope this helps!
Regards,
Boyko Stanev
Nop-Templates.com
Freddy1234
9 months ago
#14203 Quote
Avatar
  • 41
PM
Boyko wrote:
Hi,


I would like to show all out of stock products in my categories pages, search results pages, product tags page, filters applied pages.

What is the customization required to achieve this.

We have a many out of stock products at this time in our store.  Instead of deleting the products we would like to move all these products at bottom in all results pages.

It would be really help us if you can reply early with positive response.

Thanks in advance.

Hi prasad1709,

By default nopCommerce shows out of stock products unless you have unpublished them.
If you want to show the out of stock products at the bottom you can change their display order in the category/manufacturer mappings as nopCommerce uses it for the default sort option which is "By position". So you can write a script to change all mappings for the out of stock products and update the Display Order to be different than the default one which is 1.

Hope this helps!


Did anyone try this out andif that was the case how did it work any issues regarding loading times?
Boyko
9 months ago
#14209 Quote
Avatar
  • Moderator
  • 1413
PM
Freddy1234 wrote:
Did anyone try this out andif that was the case how did it work any issues regarding loading times?


Hi Freddy1234,

If you run this script as part of a scheduled task then this should not impact the performance of the filters at all.
Regards,
Boyko Stanev
Nop-Templates.com