How to Remove Decimal From Quantity in Magento 2 Admin Product Grid

Therefore, you may want to remove this unnecessary format of quantity and simply display it as 100 in the products grid in the admin panel of Magento 2.
That’s it.
Thank you for subscribing.
However, in most cases, the product quantity is always in the whole number. The integer value of the product quantity does not make sense.
Also, do share the post with Magento Community via social media.
Magento 2 CMS offers grids in the admin panel for easy data management. It offers the Products, Customers, Orders, etc. grids to manage the data of products, customers, and orders.
The Products grid in Magento 2 displays product information like product ID, thumbnail, name, product type, attribute set, SKU, price, quantity, status, etc.
Something went wrong.
The below image shows the default format of how the product quantity is displayed in the admin product grid in Magento 2:

Programmatic Method to Remove Decimal From Quantity in Magento 2 Admin Product Grid:

(after SS)
Use the above code and improve the product grid for simpler understanding!
Now, in the default Magento 2 CMS, the product quantity is displayed in the decimal format up to 4 decimals. For example, it shows 100.0000 quantity for products with 100 quantity.
(before ss)
Thank you.
Once implemented, the product quantity will be displayed as shown below:
Any doubts in the above method can be mentioned in the Comments section below. I’d be happy to help.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

You can remove decimals from quantity in Magento 2 admin product grid using the below code.
Today, I’ll talk about the products grid, and particularly the product quantity column in the products grid.




(based on 0 Reviews)