I want to add Qty field on product list page for configurable product and simple product. I am using Magento 2.3.1 can you guide me how can I do?

enter image description here

1 Answer 1


You just need to add input in your form.

You can put it on above Add to cart.

You can add in below file:


<input type="number" name="qty" id="qty" maxlength="12" value="<?php /* @escapeNotVerified */ echo '1' ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" />

Hope above will help!


  • I use this code but it works only for simple product but I want to display configurable product as well.
    – kiran
    Commented May 16, 2019 at 19:05
  • I checked it is working for configurable as well!
    – Pawan
    Commented May 16, 2019 at 19:09
  • List.phtml is applicable for both
    – Pawan
    Commented May 16, 2019 at 19:09
  • Hi Pawan, I want text box for each size.please see attached screenshot: imghostr.com/F2QnsQgR
    – kiran
    Commented May 16, 2019 at 19:53
  • 1
    I need to add multiple products with multiple sizes on the Category page at once?
    – kiran
    Commented May 17, 2019 at 13:15

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.