Product Quantity increase by Quantity+Quantity

1 0 0

Hello Everyone! Please help me to solve this issue.


I have implemented an app-MultiVendor Marketplace to my store. Now all the products MOQ (minimum order quantity) is auto stored to my input field with this class="wk_qty_selector" 


Now I want to display double quantity when increase button is pressed (+)

For example MOQ is 5, so when increased- input value would be  5, 10, 15, 20... when decreased 20,15,10,5 accordingly 


Actually, this line:  <div class="qty_value"></div>    displays the initial MOQ from seller to the website but I can not take from there a value to assign in for input step.


I have tried to get the value from class as: var elements = document.getElementsByClassName('qty_value');

but it did not work.


Here is my code for input: 


<quantity-input class="quantity">
<button class="quantity__button no-js-hidden" name="minus" type="button">
<span class="visually-hidden">{{ 'products.product.quantity.decrease' | t: product: product.title | escape }}</span>
{% render 'icon-minus' %}

<input class="wk_qty_selector"
style="pointer-events:none; color:currentColor; font-size:1.4rem; font-weight:500; opacity:0.85; text-align:center; background-color:transparent; border:0; padding: 0 0.5rem; width: 100%; flex-grow: 1; -webkit-appearance:none; appearance: none"
id="Quantity-{{ }}"
form="{{ product_form_id }}"

<button class="quantity__button no-js-hidden" name="plus" type="button">
<span class="visually-hidden">{{ 'products.product.quantity.increase' | t: product: product.title | escape }}</span>
{% render 'icon-plus' %}



Replies 0 (0)