0

Can we sort products In stock only.

see the below screenshot. enter image description here

2 Answers 2

0

You can enable it from the backend.

Admin -> Stores -> Attributes -> Products -> quantity_and_stock_status -> Used for Sorting in Product Listing = Yes

2
  • I want to show only Instock Products instead of all
    – kiran
    May 20, 2021 at 15:36
  • For that, you can use a filter instead of sorting. because in sorting all product data arrange by particular order and in a filter you will get only that data which you want. or if you don't want to show out of products at all then you can set from the admin Stores -> Configuration -> Catalog -> Inventory -> Stock Options -> Display Out of Stock Products = No
    – Mital Shah
    May 21, 2021 at 5:26
0

Set Display Out of Stock Products configuration to "No" in the backend

Stores -> Configuration -> Catalog -> Inventory -> Stock Options -> Display Out of Stock Products

1
  • we allow backordered so we displayed out of stock products in frontend.
    – kiran
    May 28, 2021 at 15:57

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.