How to Update price automatically when quantity changed on the product page?
I am updating the qty input type to dropdown through below code and I want when I change the qty in dropdown price to be updated...
<td class="col qty" data-th="<?php echo $block->escapeHtml(__('Qty')); ?>">
<div class="field qty">
<select id="cart-<?php /* @escapeNotVerified */
echo $_item->getId() ?>-qty" name="cart[<?php /* @escapeNotVerified */
echo $_item->getId() ?>][qty]" title="<?php echo $block->escapeHtml(__('Qty')); ?>" data - cart - item -
id="<?php /* @escapeNotVerified */
echo $_item->getSku() ?>">
<?php for ($i = 1; $i <= $qty; $i++): ?>
<option value="<?php echo $i; ?>"<?php if ($i == $block->getQty()) {
echo 'selected';
} ?>><?php echo $i; ?></option>
<//?php $i = $i + 4; ?>
<?php endfor; ?>
</select>
</div>
</div>
</td>