All things Shopify and commerce
Hi,
I'm looking for a way on how to limit transactions to one item and one quantity only per checkout.
Thank you
Solved! Go to the solution
This is an accepted solution.
Hi there @Besguerra!
Don here from Shopify. 🙂
The first thing that comes to mind for your requirements is the Order Limits (MinMaxify) app.
I know that this will allow you to set a maximum (as well as minimum) product quantity.
From your post here, it sounds like you also want to restrict which products a customer can purchase as well as limiting the quantity of that item to one per customer?
I'm not 100% certain, but it does sound from the app store page description that this app should also be able to limit:
* Number of items for a specific product
* Number of items within a group of products
If you want to be totally sure of any aspect of using this app I would reach out to its developers using the contact details listed on the app store page as they will be able to field any queries you have about using this app.
Should you prefer to get this functionality coded into your store rather than using an app, you can also consider hiring an Expert Developer to create a private app or otherwise handle this using a custom-coded solution.
Are you still getting set up with your business here or have you been selling for a while already?
Regards,
Don
Don | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
The solution is the same as every other basic Shopify feature that is missing .... pay pay pay
Its honestly a joke how many times I have hunted around for how to do the most basic e-commerce feature and found myself reading a thread of other users asking for the same feature for YEARS, with the only option being to pay monthly for a plugin.
I use Shopify but have never and will never recommend it to anyone else because of this.
If you are listening (Shopify) please create a wish list for features where people can add and vote what they would like to see integrated and then dedicate a team to start implementing them.
Shopify offers an app store, and they make money on apps installed from that app store. Someone built an app that solves this issue (for merchants that can code, they can implement this solution with code fwiw). But by bringing this feature in natively to Shopify, they're cutting a revenue stream for themselves and a third-party app developer. I'm not arguing it's good or bad -- just that the incentive to please merchants for a lot of these asks just doesn't have a sense of urgency, because, well, there's money left on the table.
I get that, but my point being that this business model also incentives Shopify to deliberately omit functionality because it will create more revenue for them. Think about that, they make more money by making a worse product. That is a negative feedback loop and in many cases the feature omissions are beyond ridiculous. For example, i recently discovered there is no way for a customer to manage their own account password, if they need to change it, we need to manually send them a reset request. I honestly can't think of a single online platform that doesn't have this feature built in and guess what, if you want this functionality in Shopify ... surprise surprise, there is an app for that and its NOT free. There is no excuse for that, its pure greed and not only have I stopped recommending shopify to others because of it, but I'm actively looking for a good alternative, not going to name drop but there are a few out there. The thing that lured me to shopify was the ease of initial setup, but beyond that, I wish I went with something that didn't have this app store business model. The number of apps I've consequently had to install or get devs customised is more than any Wordpress site I manage (which says a lot)
I hear you, and I do agree. And there's certainly some apps that have been absorbed by native Shopify, and with the release of Shopify Functions, I think there's going to be a lot of app store apps that will be dethroned by the more clever merchants that realize it's a huge sandbox of options for them.
Not sure where you're getting your reset password info, but virtually anyone with an account on almost any storefront can simply go to the xxx.myshopify.com/account, click the "Forgot Password" link and reset their own password via email. It doesn't require a back office reset whatsoever (assuming it's a store-bought theme). That's a pretty standard feature.
Right, but why is it 'forgot password'? what if they are logged in already? i honestly get customers asking me this because they are logged in and looking at their account page trying to find the password settings because that's how it works everywhere else. forgot password is not intuitive if you know your password but want to change it.
I just gave that example but there are many others and believe me, Im not trying to trash shopify, if anything this comes from a place of wanting to love it and recommend it to others but its just difficult when so many basic features are hidden behind a this app paywall. I wouldn't even mind if there was a more granular subscription that enabled these features, its just the idea of app after app that is irritating and means the cost of ownership is not clear from the start. You also bring up a good point, this model means that as an app developer you could suddenly become redundant on the whim of shopify, if they decide to implement the functionality that you developed as an app but that is another story.
Would LOVE a limit per order feature! Seems basic enough.
It's basic feature that should be build in to the platform. I sell software licenses and don't want customer to be able to select more than one Quantity per product in the cart.
You can do this with Custom Data by adding a field to all your products called Max Cart Quantity, then edit your Liquid templates in the right place to set the max="" field on the Quantity <input HTML tag.
Steps:
It should look like this once saved:
Note the custom field key of product.metafields.custom.max_cart_quantity.
Now lets edit your theme:
<input
class="quantity__input"
type="number"
name="quantity"
/>
Edit it to add a max field with a condition like:
{%- if product.selected_or_first_available_variant.product.metafields.custom.max_cart_quantity != null %}
max="{{ product.selected_or_first_available_variant.product.metafields.custom.max_cart_quantity }}"
{%- endif %}
Note the custom field key of product.metafields.custom.max_cart_quantity that was configured in our Custom Data for Products.
Now you can go edit any of your products and edit the Max Cart Quantity custom field that you made.
So I tried updating the code but it still didn't work. I did get an error message on a product page stating There was an error while updating your cart. Please try again. but it still let me add the products to my cart and go through with the checkout process. Any help would be greatly appreciated.
main-cart-items.liquid updated code
<input
class="quantity__input"
data-quantity-variant-id="{{ item.variant.id }}"
type="number"
name="updates[]"
value="{{ item.quantity }}"
{% # theme-check-disable %}
data-cart-quantity="{{ cart | item_count_for_variant: item.variant.id }}"
min="{{ item.variant.quantity_rule.min }}"
{% if item.variant.quantity_rule.max != null %}
max="{%- if product.selected_or_first_available_variant.product.metafields.custom.max_cart_quantity != null %} max="{{ product.selected_or_first_available_variant.product.metafields.custom.max_cart_quantity }}" {%- endif %}
{% endif %}
step="{{ item.variant.quantity_rule.increment }}"
{% # theme-check-enable %}
aria-label="{{ 'products.product.quantity.input_label' | t: product: item.product.title | escape }}"
id="Quantity-{{ item.index | plus: 1 }}"
data-index="{{ item.index | plus: 1 }}"
>
main-product.liquid code that was updated
<input
class="quantity__input"
type="number"
name="quantity"
id="Quantity-{{ section.id }}"
data-cart-quantity="{{ cart_qty }}"
data-min="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
min="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
{%- if product.selected_or_first_available_variant.product.metafields.custom.max_cart_quantity != null %}
data-max="{{ product.selected_or_first_available_variant.quantity_rule.max }}"
max="{{ product.selected_or_first_available_variant.product.metafields.custom.max_cart_quantity }}"
{%- endif %}
step="{{ product.selected_or_first_available_variant.quantity_rule.increment }}"
value="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
form="{{ product_form_id }}"
/>
From what I can see.. sure, that would work. However, when you're on a Featured Product page and you add 1, the item is added, but you'll stay on the same page. You can then click 'add to cart' again and it will add this same item to the cart, etc. Quantities in the cart is now increasing.
How can THIS be resolved? (If the page would update, then you can get around this .. but not when it stays on the same page)
I am having the same issue. It works on the product page, but not on the cart. Any updates would be really appreciated!
Yesterdays Editions Update presented a new validation API for the cart and checkout. Hopefully we will get at least an app with good UX. All current apps just rely on frontend validation and are not really nice for the customer... 😞 Maybe the new API Is simple and we will see a free or cheap app for that.
shopify.dev/docs/api/functions/reference/cart-checkout-validation?utm_campaign=winter24edition&utm_source=editions&utm_medium=W24E-page&utm_content=W24E&utm_channel=W24-editions-website
Hi Dear
As I know, some Apps in the app Store give you this option.
I recommend Discounty App to you. Install It and use the Quantity Discount option as you want.
I realize this is an old thread, but I was looking for this solution, as well. Ultimately, I figured out how to code it myself in Dawn.
I had already removed the quantity selector from the item in question, but needed a way to prevent the customer from adding more in the cart, and THEN a way to prevent them from going back to the product page and adding another by selecting Add to Cart. I think I have all the bases covered now.
If anyone is still looking for this solution, I’m happy to help if I can.
Prevent from adding more to the cart: Put in a check that checks if it's already in the cart. If not show the 'add to cart' button, otherwise show message.
I believe it was discussed here in this thread (or perhaps another) that that is not enough. You have a quantity button in the cart, too. And it needs to be for only particular products.
And as I said, I’m not looking for help on this, but offering help if anyone else is stuck.
But thanks for trying to help.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024