Debut theme: minimum order for some products

Hello,

I need to set a minim order for some products, I change the minimum quantity from product-template.liquid, now I need to fixed this minimum amount also in cart-template.liquid for obtain a minimum order.

I write those code:

Product-template.liquid:

Show More

{% assign productTags = product.tags | join: ', ’ %}

{% if productTags contains ‘min1072’ %}

{% else %}
{% if productTags contains ‘min1500’ % %}

{% else %}
{% if productTags contains ‘min5250’ % %}

{% else %}

{% endif %}
{% endif %}
{% endif %}

cart-template.liquid

Show More

{% assign productTags = product.tags | join: ', ’ %}

{% if productTags contains ‘min1072’ %}

{% else %}
{% if productTags contains ‘min1500’ % %}

{% else %}
{% if productTags contains ‘min5250’ % %}

{% else %}

{% endif %}
{% endif %}
{% endif %}

How can I solve?

I’m apologise: if I click on html I can’t publish my post

Hi @Rlmps11 ,

I checked and see the code has been added, what do you want us to solve? Code not working at cart-template.liquid?

Please explain more about it, I will help you check it.

Yes it is possible to set minimum order for some products by using the Cart Lock https://apps.shopify.com/cart-lock app easily. Here is how you can do it:.

  1. Open the app and click on the “Add a new rule” button.
  2. Click “Add a new condition” and select the “Cart subtotal” then put 50 in the “Block if less than” field.
  3. Click “Add a new condition” and select the “Products” then add your products.
  4. In the “Error message” field, add an appropriate message which will be displayed in the checkout page.
  5. Click "Match conditions " and add "ALL.
  6. Save the rule.

Now your customers cannot checkout the specific products if the order amount is less than 50.