I want to hide the quantity box for a specific products on the checkout cart page.

I have referred this link Magento 2: How to hide quantity box for certain products which has only quantity?

But it is not helping me out.

Any help would be appreciated.

1 Answer 1


Short version:
At first. Whats rule that defines which product should be visible with qty?
Specific category? Specific Attribute set? Specific attribute value?

Then on cart check those rules for every entity. By default phtml that displays qty is here:


But it may be somewhere else (depends on theme and project custom modules).
Search by qty.

I mean, create own module with logic that return false or true for qty input, override this phtml with block. Using block, call function that return bool for qty for specific product and show or not this input depends on bool.

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.