I want to add stock status dropdwon filter in product admin grid like this:
I tried this: https://magecomp.com/blog/how-to-add-stock-status-column-in-admin-product-grid-magento-2/ but it didnt work.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI want to add stock status dropdwon filter in product admin grid like this:
I tried this: https://magecomp.com/blog/how-to-add-stock-status-column-in-admin-product-grid-magento-2/ but it didnt work.
Hi @mechanic Try this one I hope it works-
<column name="stock_status">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Magento\CatalogInventory\Model\Stock\Status</item>
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">select</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="label" xsi:type="string" translate="true">Stock Status</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
</column>
https://meetanshi.com/blog/add-stock-status-column-in-product-grid-in-magento-2/