Add quantity 2 when adding to cart from product view page.
For only one product because it calls a 2-time post request for one product.
After clearing cache and checking and some time that works, but again that problem comes in other product.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
<input type="number" name="qty" id="qty" maxlength="12" value="<?php /* @escapeNotVerified */ echo $block->getProductDefaultQty() * 1 ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>" />
change value to "2"
Have you considered using the built in functionality within magento for Minimum Qty Allowed in the Shopping Cart just make sure you set Enable Qty Increments and set the Qty Increments value this should give the customer a notification prior to adding to the shopping cart thus preventing the need for adding to cart multiple times.