Top

Require Customer with a Specific Tag to Have a Minimum Cart Quantity before Checkout

Warning!

This is an unsupported theme customization. You can request this customization by emailing our Professional Services Team.

Customer Specific Pricing is designed to create price points for different types of customers (wholesale, trade, VIP and more). Customization can be done for stores that require their customers with a specific tag to reach a predefined cart quantity before checking out.

Note: This will not work with an Ajax theme (also known as a "slide","drawer", or "pop-out" cart).

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    select actions

  3. Select Edit HTML / CSS.

    select edit html / css 

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

    Note: If your theme contains sections, this may be found under "sections" in cart-template.liquid instead.

     select cart.liquid

  5. Find the Checkout button, the code will be similar to this:
    <input id="checkout" name="checkout" type="submit" value="Check Out" />

    find the checkout button 

  6. Copy and paste this code immediately above the line:
    {% if customer.tags contains 'wholesale' %}
    {% assign wholesale_count = cart.item_count %}
    {% if wholesale_count >= ### %}

    Note: Replace "wholesale" with the tag required. Replace "###" with the minimum cart quantity.

    paste the code 

  7. Immediately below the input statement from Step 5, copy and paste:
    {% else %}
    You need to have ### products in the cart before checking out.
    {% endif %}
    {% else %}
    <input id="checkout" name="checkout" type="submit" value="Check Out" />
    {% endif %}

    Note: You can replace "You need to have ### products in the cart before checking out." with the text you want to display here.

    The final code should look like this:

    {% if customer.tags contains 'wholesale' %}
    {% assign wholesale_count = cart.item_count %}
    {% if wholesale_count >= ### %}
    <input id="checkout" name="checkout" type="submit" value="Check Out" />
    {% else %}
    You need to have ### products in the cart before checking out.
    {% endif %}
    {% else %}
    <input id="checkout" name="checkout" type="submit" value="Check Out" />
    {% endif %}

    final result 

  8. Select Save.

    select save 

That’s it!

Have more questions? Submit a request