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?
1 Answer
You just need to add input in your form
.
You can put it on above Add to cart
.
You can add in below file:
app/design/frontend/{Package}/{theme}/Magento_Catalog/templates/product/list.phtml
<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.– kiranMay 16, 2019 at 19:05
-
-
-
Hi Pawan, I want text box for each size.please see attached screenshot: imghostr.com/F2QnsQgR– kiranMay 16, 2019 at 19:53
-
1I need to add multiple products with multiple sizes on the Category page at once?– kiranMay 17, 2019 at 13:15