How can I adjust the quantity box to add multiple units at once?

victor6am
New Member
4 0 0

Hello,

We need to change the quantity added or subtracted in the quantity box. Not to add one by one, but add a metafiled figure (box complete) quantities. I mean, when you add a unit, not add a unit but 8 units (for example).

(8-16-24, etc). 

Could anyone help us with this?

Thank you in advanced

 

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
7532 1454 1451

Hi @victor6am 

I'm Dan from Ryviu: Product Reviews & QA app.

You can find the quantity code of your theme and change those values to do that.

Screenshot 2024-02-28 at 14.34.22.png

- Helpful? Like or Accept solution! - Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

victor6am
New Member
4 0 0

Thank you for your reply:

I only found this code (Symmetry Theme)

 

<div class="quantity buttoned-input">

<a id="updates_dec_{{ forloop.index }}" class="quantity-down" href="{{ routes.cart_change_url }}?id={{ item.key }}&quantity={{ quantity | minus: 1 }}" aria-label="{{ 'cart.items.decrease_quantity' | t | escape }}">{% render 'icon-minus' %}</a>

<input
class="cart-item__quantity-input"
type="number"
size="2"
id="updates_{{ forloop.index }}"
name="updates[]"
data-initial-value="{{ quantity }}"
data-key="{{ item.key }}"
min="0"
{% if item.variant.inventory_management != blank and item.variant.inventory_policy == 'deny' and item.variant.inventory_quantity > 0 %}
max="{{ item.variant.inventory_quantity }}"
value="{{ quantity }}"
{% else %}
value="{{ quantity }}"
{% endif %}
aria-label="{{ 'cart.items.quantity' | t | escape }}" />

<a id="updates_inc_{{ forloop.index }}" class="quantity-up {% unless can_increase %}unusable{% endunless %}" href="{{ routes.cart_change_url }}?id={{ item.key }}&quantity={{ quantity | plus: 1 }}" aria-label="{{ 'cart.items.increase_quantity' | t | escape }}">{% render 'icon-plus' %}</a>
</div>

<a class="cart-item__remove small-text underline" href="{{ routes.cart_change_url }}?id={{ item.key }}&quantity=0">
{{- 'cart.items.remove' | t -}}

</a>

</div>

 

But any change works, I don´t know if there is other similar code in other place.

For example, if I change quantity={{ quantity | minus: 1 }} for this: quantity={{ quantity | minus: 5 }}, anything happens. It still discount one by one.

 

Is possible that those variables are being modified in other part of the code?

 

Thank you very much