Cart Limits
Updated over a week ago

Introduction to Cart Limits

The Cart Limits feature in Merchant Portal allows merchants to configure Suggested Cart Size and a Cart Upper Bound limit. It is used to encourage certain shopper behavior and allows merchants to define guardrails around the TryNow shopper experience.

What is a Suggested Cart Size?

The Suggested Cart Size is used to encourage shoppers to try a certain number of TryNow items. This is often used in copy throughout your entry points or in the copy under the TryNow CTA button and it is meant to encourage shoppers to add more TryNow items. This will increase the chance that they find something they love and keep.

What is a Cart Upper Bound limit?

The Cart Upper Bound Limit is used to limit the number of TryNow items a shopper can check out with. When a shopper reaches the limit, the TryNow button becomes disabled. This explains to the shopper that they have reached the limit and also prevents them from being able to add more TBYB items.

Theme Compatibility Requirements

  • In order for this feature to work as is, you must be using the TryNow button app block, and the Cart Features app embed block must be toggled on.

If your button requires some custom logic or you have a unique, not widely supported minicart, it requires more custom work to identify the right cart selectors and triggers for our app to disable the TryNow button when the limit is reached.

If custom logic is required, it is recommended that you have a developer undertake this task, as it can be complex. Below is some step-by-step guidance:

  1. Create a function that fetches the cart contents on page load using the Shopify Cart API.

  2. Based on the cart contents, an item is TBYB when it has an item.selling_plan_allocation_selling_plan.id equal to the one we add via our meta tag (meta[name="trynow:selling_plan_id"]) when our app embed is toggled on.

  3. Create a listener for certain cart routes, i.e. '/cart/add', '/cart/change', '/cart/update', to know when something in the cart has changed.

  4. So when the cart limit for TBYB items is reached, it can disable both the custom TBYB button and the quantity buttons in the cart (/cart) and side cart for items that are TBYB, so their quantities can't be increased.

  5. Add some conditions for when the TBYB is then unmet, so everything shows back as normal.

Steps to Implement

Get ready to implement Cart Limits! Ensure that you have:

Step 1: Log in to Merchant Portal and navigate to the Features tab, then navigate to the Cart Limits section.

Step 2: Now you can define your configurations.

Suggested Cart Size: This is the number of TryNow items you want to encourage shoppers to add to their cart. This number is not enforced.

Cart Upper Bound Limit: This number is limit of TryNow items a shopper can take to checkout. This number is enforced.

Enter in the numerical value that you would like to set your suggest cart size and cart upper bound limit to.

Then hit the "Save" button.

Step 3: Click on the "Configure Theme" button.

This will open up a new tab that automatically redirects you to the app embed block. Turn the toggle on and make any desired configurations.

Step 4: Once you have turned on the app embed block and made any desired configurations, your last and final step is to hit "Save" to save your changes!

You have now finished implementing your cart limits feature! At any point, you can refer to the Cart Limits section in Merchant Portal to make any revisions to your configurations.

Did this answer your question?