Can customers buy in increments (eg. buy 5 for $X, buy 10 for $Y, etc.)?

You can modify your theme to do this by following these steps:

  1. From Shopify's admin, select Online Store.

    select online store

  2. Select Actions.


  3. Select Edit code

    Edit code

  4. Under "Templates", select product.liquid.

    Note: If your theme contains sections, you may have to make these changes in a different file, like product-template.liquid under "Sections".

    select product.liquid

  5. Find the quantity box code like this:
    <label for="Quantity">{{ 'products.product.quantity' | t }}</label>
    <input type="number" id="Quantity" name="quantity" value="1" min="1" class="product-form__input" pattern="[0-9]*">

    Note: Some themes, like Radiance, do not have a quantity box. If yours doesn't, you can skip this step.

    find the quantity box

  6. Replace with this code:
    <label for="quantity">Quantity:</label> 
    <select id="quantity" name="quantity">
    {% for i in (1..10) %}
    <option value="{{ i | times: 1 }}">{{ i | times: 1 }}</option>
    {% endfor %}

    replace with this code

  7. Select Save.

    select save

That's it!

This code will create a drop-down list of the numbers 1 through 10. To customize this code:

{% for i in (1..10%} controls the number of selectable options in the drop downs.

<option value="{{ i | times: 1 }}">{{ i | times: 1 }}</option>

Change the 1 to the number of increments in your discount. So if your discounts change in increments of 25, you would change the 1 to 25.

Blog Posts:

Was this article helpful?
1 out of 1 found this helpful