Hi there! We are getting ready to open our store yet had a question regarding product limiting. We are currently looking for a way to limit customers to only X amount of a Product Z in a single checkout session. Is there any way to set this limit?
Hi @RLopez
Yes, feature can be created using custom scripting in theme.
Let me know if you are willing to hire for this custom dev.
Hi @RLopez For the online sales channel that’s either through a theme customization, or app.
Is the X a set amount?
In which case for OS2.0 themes remove the quantity block from the theme and replace it with a hidden quantity amount.
And then on the /cart template hide the inline quantities buttons using CSS that targets specific variant ids, or customize the template to not render the buttons at all.
A crude example to add to a cart template settings in a custom-liquid section:
{% assign limited_item_variant_id = 1234567 %}
{% assign limited_item_variant_max_qty = 3 %}
{% for item in cart.line_items %}
{% if item.variant.id == limited_item_variant_id %}
{% if item.quantity > limited_item_variant_max_qty %}
Please remove excess items from cart.
{% endif %}
{% endfor %}
The problem isn’t often just the raw limiting on the frontend but making sure there is messaging informing the customer, and additional backend processes to handle invalid orders if they get through.
An alternative is to just bundle the items into a single priced product, then on the backend use an app to sync inventory between the bundle and individual skus.
Mechanic is an app that can be scripted for specific scenarios, example https://usemechanic.com/task/sync-inventory-for-shared-skus
If you need this customization service you can contact me directly.
Please provide context: store url, theme name, post url(s) and any further detail.
Contact Info in signature.
I know a few quality limiting add-ons that has capability to fulfill this requirement. You should try them. Try them out - KOR Order Limit Quantity, Evlop ‑ Order Limits, Advance Order Quantity Limits etc.
You can limit the quantity per item for a specific product using the Cart Lock https://apps.shopify.com/cart-lock app. Follow the steps below:
- Open the app and click on the “Add a new rule” button.
- Click “Add a new condition” and select the “Single item quantity” then add 2 or any number in the “Block if more than” field.
- Click “Add a new condition” again and select the “Products” and add your “Product Z” product.
- In the “Error message” field, add an appropriate message which will be displayed in the checkout page.
- Save the rule.
Now your customers are limited to the quantity you set for the specific items.
Hi there!
Molsoft.io offers an app called MinCart, which lets you set limits based on whole cart, product, variant, collection, vendor, product tag, and product type. You can also customize your limits by audience, exclude specific tags, and set restrictions based on total price, quantity, resource, or weight.
Plus, you can personalize your pop-up warnings and take advantage of built-in translations to tailor messages for your audience. Let us know if you have any questions! ![]()
