Hey guys. Can anyone save me? I’m trying to solve this problem myself. I tried with some apps, but despite solving this problem, they created another one. So I need to configure it in code. Has anyone made this change in Empire Theme? I need to apply it on the product page, collection page, and cart.
I need to set up minimum order quantities (with multiples) for each product per tag.
(example tag: minqty:10 for products that are sold with a minimum order of 10 pieces… in this case, a minimum of 10 pieces and in multiples of 10 (10-20-30-40).
Add code to the product page to tell the customer the minimum
Add a script that prevents adding to cart and triggers a warning message when the user tries to add to the cart under the minimum.
Example code snippet for #2
{% if product.tags contains "minimum 10" %}
This product requires a minimum quantity of 10 units
{% endif %}
Example code snippet for #3
{% if product.tags contains "minimum 10" %}
This product requires a minimum of 10 units
{% endif %}
I would add those either above or below the add to cart button. If you share this with your developer they should know what to do.
If you don’t have a developer, you can take a crack at it but make sure you do this on a backup theme and test first (this guide will help you with theme editing plus inspecting elements to get their ID: https://speedboostr.com/how-to-safely-edit-your-shopify-theme/), or if you want feel free to reach out to my team at speedboostr.com/contact if you want a Shopify developer to handle it for you.
@ana_vasbr Have you got your solution? If not then your requirements can be fulfilled with the MultiVariants - Bulk order app. But this app will only work on the product page and cart page, not on the collection page. If it suits your business then you can go ahead with the solution. For the collection page, the app will either block the add to cart button where you have applied the restriction or restrict your customer on the cart page unless the condition is fulfilled.
Through the MultiVariants - Bulk order app, you can set a minimum quantity per order for any product. If you set the minimum quantity as 10 then the customer can’t go to the cart page without choosing 10 quantities. Also, if you want to set a multiple quantity increase for the product then that can be also achieved by the app. If you set the quantity interval as 10 then it will increase like 10,20,30 and so on. After choosing any quantity the stock will be updated immediately. You set different restrictions for different products or groups of products in your store.
Also, with this app, you can apply restrictions for minimum-maximum quantities, predefined bundle, interval quantities, limits on variants and orders can be achieved. You’ll get 3 days of trial for going through all the available features.
Here is theDemo product where the customer must choose 12 items before going to the cart page and here is the Demo store with more available features.
I am using the Simple theme and trying to set a minimum order quantity on specific items, I am not a developer so am unsure where to add the code to the product-template.liquid
Hoping you can advise where to place it, below is the current code.
"
{% comment %}
Get first variant in stock, or deep linked one
{% endcomment %}
{% assign current_variant = product.selected_or_first_available_variant %}
{%- assign featured_image = current_variant.featured_image | default: product.featured_image -%}
{% if current_variant.inventory_management == 'shopify'
and current_variant.inventory_policy != 'continue'
%}
We have {{ current_variant.inventory_quantity }} in stock.
{% else %}
This product is available.
{% endif %}
I am using the Simple theme and want to set a minimum order quantity on certain products but cannot work out where to place the code. Could you advise where to place the code, in the below current product-template.liquid
"
{% comment %}
Get first variant in stock, or deep linked one
{% endcomment %}
{% assign current_variant = product.selected_or_first_available_variant %}
{%- assign featured_image = current_variant.featured_image | default: product.featured_image -%}
{% if current_variant.inventory_management == 'shopify'
and current_variant.inventory_policy != 'continue'
%}
We have {{ current_variant.inventory_quantity }} in stock.
{% else %}
This product is available.
{% endif %}