Top

Require Customers with a Specific Tag to Have a Minimum Cart Value 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 value 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 code.

    Select Edit code 

  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 cart.total_price >= ### %}
    {% if customer.tags contains 'wholesale' %}

    Note: Replace "wholesale" with the tag required. Replace ### with the minimum cart value, without decimals (ie. $150.00 is entered as 15000).

    copy and paste this code 

  7. Immediately below the input statement from Step 5, copy and paste:

    {% else %}
    You need to spend $150 to check out.
    {% endif %}
    {% else %}
    *****
    {% endif %}

    Note: You can replace "You need to spend $150 to check out." with the text you want to display here. Replace the ***** with the input statement from step 5.

    The final code should look like this:

    {% if customer.tags contains 'wholesale' %}
    {% if cart.total_price >= 15000 %}
    <input id="checkout" name="checkout" type="submit" value="Check Out" />
    {% else %}
    You need to spend $150 to check out.
    {% endif %}
    {% else %}
    <input id="checkout" name="checkout" type="submit" value="Check Out" />
    {% endif %}

    final result 

  8. Select Save.

    save 

That's it!

Next Steps