We are using Shopify Plus and have enabled the “Add-to-cart limit” feature under Advanced Preferences to protect our inventory visibility.
We would like to access this limit value directly in the Liquid files (e.g., product or cart templates) so that we can enforce or display it on the storefront. However, we do not want to use metafields, as the business users may change this value from the admin, and they are not familiar with managing metafields.
Could you please let us know:
Is there a way to retrieve the current “Add-to-cart limit” value in Liquid?
If not, is there any alternative or native way to expose it to the storefront automatically?
There doesn’t seem to be any public API (Admin, Storefront or Liquid) to access the add-to-cart limit setting as of now. Your best bet is a shop metafield used as dynamic source in the target template (with a walkthrough video for the merchant, just to be sure)
Hey all - @teamdijon is correct, at the moment, there’s no public API for the add to cart limit config. I think the workaround above is solid too, but another option you could look into, rather than relying on the built-in limit, would be to implement a Cart and Checkout Validation function that could enforce a shop-wide (or per-product) limit, and manage the value in an Admin UI extension.
Essentially, you could store/configure the limit in an app-owned metafield and read it in both Function (enforcement) and Liquid (display) reliably. Then, you wouldn’t need to touch metafields directly; and the Admin UI extension could work like a UI to handle implementing the metafield “rules”.
It’s definitely a little more complicated and not theme-specific, but just wanted to share this as another method in case you were looking for other ideas. Hope this helps!