1

I've added qty input on product list (list.phtml). Is there any way to implement solution with update qty, like on cart page or minicart? not just add to cart but qty update in product list too.

1 Answer 1

0

Try below code on this page to get it work.

app/design/frontend/Package/theme/Magento_Catalog/templates/product/list.phtml

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

Hope it works.

6
  • Hi, Thanks but I added input yet, just want to add behavior like on cart page or minicart for example if u set 10 in product qty input and click enter cart and this product input will be updated, in input you will can see 10 all the time(like on cart page or minicart), when u in this same input type for example 5 then cart and this product qty input will be update and qty will be set on 5. Jul 25, 2017 at 20:58
  • so you mean to say cart and mini cart is not merging "Qty" of exisiting product. right? Jul 25, 2017 at 21:01
  • nope, they merging - but I need it on product list qty input. Add something to cart and see on behavior of product update, this same I need on product list or product page, but it not be problem to implement there if it will working on product list. Jul 25, 2017 at 21:04
  • 1
    so in that case, i think you have to get product "QTY" from Quote and update it on Product listing and Product detail page by Product ID. Jul 25, 2017 at 21:06
  • Yeah, but how? :) trying few hours and can't get solutions, just get qty from quote but can't update it :/ Jul 25, 2017 at 21:08

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.