Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Categories: cannot manual sort out of stock products in back-end #3395

Closed
tropilex opened this issue Sep 25, 2024 · 5 comments
Closed

Categories: cannot manual sort out of stock products in back-end #3395

tropilex opened this issue Sep 25, 2024 · 5 comments
Assignees
Labels

Comments

@tropilex
Copy link

Hello,

The out of stock products are not showed in the "Product List Preview and Sorting". So you cannot sort them manual.

So the problem is that when you manual sort the products and then new stock comes for a product that product is not sorted and will be showed last.

Magento setting
Display Out of Stock Products = No

Screenshot 2024-09-25 at 09 29 19

Magento Version: 2.4.6-p7

ElasticSuite Version: 2.11.9 (but this is on older versions also)

Environment: Production

Steps to reproduce

  1. Go to Admin --> Catalog --> Category --> Select a category
  2. Try to sort out of stocks manual
  3. You don't have the option to manual sort out of stock products

Expected result

  1. A full list of all products in the category so you can sort all products.

Actual result

See the following screenshot. We have 9 products but only 3 available for manual sorting.

Screenshot 2024-09-24 at 21 56 15

@tropilex tropilex changed the title Cannot sort out of stock products in back-end Categories: cannot manual sort out of stock products in back-end Sep 25, 2024
@tropilex
Copy link
Author

BTW: I tried this setting but that didn't help. It also says it's for a different 'problem' but you can always try. ;-)

Screenshot 2024-09-25 at 09 43 42

@rbayet
Copy link
Collaborator

rbayet commented Sep 25, 2024

The category preview shows you the list of products as they appeared in the currently selected or default store view.
If you chose to configure Magento to hide out-of-stock products in the frontend, yes, they will also be hidden in the category preview in the backend.

Indeed the second option "Ignore manual positions ..." is more for if you choose to show out-of-stock products in the frontend but you don't want to have an "just been out-of-stock product" manually positioned in the frontend.
In that case only, the category preview is no longer "exactly what the frontend is showing".

Have you considered the following combination ?

  • Showing out-of-stock products on your site
  • But creating an optimizer to boost products that are in stock in catalog navigation: by default, your categories will first display in stock products and then out-of stock ones
  • For specific categories, you will still have the ability to pin specific products at the first positions
  • Depending on what you want to achieve you will be able to keep products pinned at their configuration position OR NOT depending on "Ignore manual positions of [...]"

Regards,

@tropilex
Copy link
Author

Hello @rbayet ,

Thanks for your reply. It is much appreciated!

Unfortunately we don't want to show out of stock products. Then we get too many questions about when the product will be back in stock.

I actually find it quite weird that you can only sort manually if you happen to have all products in stock at that specific moment. Otherwise the function is quite useless. This was also not necessary with the regular Position.

The only solution I see is to set ‘Display Out Of Stock’ to Yes. Then manually rank the category and then set ‘Display Out Of Stock’ to No again. And then hope it saves the positions correctly, even in the event of any minor change.

Is there any way to get the native Magento Position back again? That it is a bit more visually appealing now and you then drag and drop is unnecessary for us.

Regards, Kees

@rbayet
Copy link
Collaborator

rbayet commented Sep 26, 2024

Hello @tropilex,

You can try the following :

  • disable the Smile_ElasticsuiteVirtualCategory module (you will lose the backend category preview and the Virtual Category feature, though)
  • either patch \Smile\ElasticsuiteCatalog\Model\Product\Indexer\Fulltext\Datasource\CategoryData or add the following definition somewhere to your DI to make sure the position "0" (the first in Magento 2 native positioning mechanism) is not ignored when indexing category data
    <type name="Smile\ElasticsuiteCatalog\Model\Product\Indexer\Fulltext\Datasource\CategoryData">
        <arguments>
            <argument name="filterZeroPositions" xsi:type="boolean">false</argument>
        </arguments>
    </type>
  • if you want to get back the product positions you had already configured, you'll need to look for them in the custom DB table smile_virtualcategory_catalog_category_product_position

Native positioning feature of Magento is back :
image

Products correctly sorted in the frontend :
image

Cheers,

@rbayet rbayet pinned this issue Sep 26, 2024
@tropilex
Copy link
Author

Thanks. We will look in to it if this is a good solution for us!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants