Do you know how I can get the "Qty Increments" on the product page?

Product page back end: enter image description here

Code 'addtocart.phtml': enter image description here

With this code, I have a blank field.

Thanks in advance.

1 Answer 1


Try following way:

$qtyIncrements = 0;
$validators =  $block->getQuantityValidators();
if(isset($validators['validate-item-quantity']) && isset($validators['validate-item-quantity']['qtyIncrements'])) {
    $qtyIncrements = $validators['validate-item-quantity']['qtyIncrements'];
<input type="number" name="inc_qty" value="<?php echo $qtyIncrements;?>"/>

Check here how to add stock data into product view block

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.