3

I want to remove the 'Qty' field without removing the 'add to cart' button. But the best I've found is:

<referenceBlock name="product.info.addtocart" remove="true" />

Which removes both fields. Any suggestion to avoid this? Thank you.

enter image description here

2
  • How about adding some CSS .field.qty {display: none;} that hides it?
    – Barry
    Dec 10, 2019 at 11:48
  • Your solution make sense, but for some reason it doesn't work. I replaced the line in '/var/www/html/magento/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less' Dec 10, 2019 at 12:12

1 Answer 1

3

for remove only quantity box you must override addtocart.phtml file. follow the below link.

https://www.templatemonster.com/help/magento-how-to-remove-quantity-box-on-product-details-page.html

2
  • The code to remve from the file is a bit different in magento 2.3.3 but it's easy enough to figure out to accept your answer. Thank you. Dec 10, 2019 at 12:30
  • Thanks @AdrianLopez Dec 10, 2019 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.