Custom quantity values?

New Member
1 0 0

Hello, I am buiding a store that offers custom printing. For example, a customer has designed some business cards, and would like to send them to me for printing. The quanitites that I offer are 25, 50, 100, 250, 500, 100, and 2500. I thought of adding a variant for quantity, but then I would have to eliminate the standard quantity form field. Is there a way to get rid of that form field? Or a better way to go about doing this?

Also, are there any apps that you're aware of that offer multiple file upoads with a previews?

Thanks!

Nate

 

0 Likes
Shopify Expert
2676 65 667

Hi Nate, 

you can do it by modifying your theme to replace the text-entry for quantity with selector. You current theme has something like this for the quantity entry field:

<input type="number" id="Quantity" name="quantity" value="1" min="1" class="quantity-selector">

The idea here is to replace it with something like:

  <select id="Quantity" name="quantity">
    <option value=1 >1</option>
    <option value=10>10</option>
    <option value=20>20</option>
    <option value=50>50</option>
  </select>

However, as you would probably be offering some discounts for bulkier purchases, it's better to do with variants.

In this case quantity field can be removed -- some themes offer this option in theme Customizer, but it can be simply commented in theme code if not.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
1 Like
Tourist
7 0 2

Thank you so much. Commenting out the code worked. 

 

{% comment %}
   <div class="product-form__item product-form__item--quantity">
      <label for="Quantity">{{ 'products.product.quantity' | t }}</label>
      <input type="number" id="Quantity" name="quantity" value="1" min="1" class="product-form__input product-form__quantity">
   </div>
{% endcomment %}

 

 

0 Likes
New Member
1 0 0

@tim Is this available to implement on one product item only, versus changing the quantity selector on every product? For instance, I might have a t-shirt that comes in quantities of 1,2,3,4,5, but within the same store (and on the same theme and shop) - I would have a fillable bottle that would need a quantity with increments of 1.5, 2, 2.5, 3 (& so on...)

0 Likes