How to set minimum quantity on certain products without using apps?

Hi,

I have a food business and some items require a minimum quantity of 4. Is there an easy way to code this or other way (without using apps) to incorporate this into the Crave theme?

Hello @dekiv

Please share your website URL. I will check and I will try to give you a proper solution.

Thanks

Hi @Coder71

Thanks!

URL is https://evolve-meal-prep.myshopify.com/ but is password protected. Let me know if you want collab access or I can supply password.

Please send me the password.

Actually, lot easier if you can just request collab access

Collaboration request sent.

Done

ok thanks

I just checked your website. Actually, there is no option to choose quantity in your Menu page. So you can do some custom theme coding and execute the following way

At first you need to add a custom Tag for Minimum Qty. Then you can show a quantity dropdown, and when someone click on Add to Cart, you can check the minimum quantity from product tag and execute the Add to Cart Action.

Thanks

@Coder71 Ok thanks for having a look.

how do I go about coding that?

Do you have any idea about Javascript coding?

@Coder71 I do but do not use Javascript often so probably dont know how to

Actually, I have some knowledge about JavaScript and Liquid coding. Otherwise, it will be hard to do from your end. And you need to use App. You can hire a Shopify Developer to do the job.

Hi @dekiv ,

First, you need to create a new template to change the code for some products you want, refer here

Then please send me the code of product-template.liquid file, I will guide you to change the code

Thanks @LitExtension

So when I create the template does that create a new page for the products or how does it all work?

Hi @dekiv ,

Yes, when you create the template it will create a new product page so you can set everything up, or you can also add tags for quantity limited products, I can still add conditions by tag.

Hope it is clear to you.

@LitExtension sorry for late reply, I’ve been away for work. And thanks for clarifying.

So if I add a tag for these minimum quantity products instead (i.e Minimum) then we can also setup the minimum quanity through this way? If so, I think that would be a lot easier.

Do you need me to tell you the tag name or?

Hi @dekiv ,

First you can add tag as you like, then send me tag name and code of product-template.liquid file, i will check it for you

Hi @LitExtension

I’ve created the tags for the three products in question. But I cannot find product-template.liquid file. I don’t have that under the “templates” tab section of the code.

Hi @dekiv ,

Please send me the code of main-product.liquid file, I will check it