Cart based app extensions can't be previewed in the theme editor

When an app deep links a merchant into the theme editor to place or preview a block that lives in the cart drawer or on the cart page, the preview always renders with an empty cart.

There is no way to seed the preview with a cart line item, so the merchant lands on a page that renders the app block as blank and has no way to tell whether it configured correctly.

Can’t you just tell the user to add an item to the cart?

In theory the merchant could just add an item to the cart to preview the block inside the cart page or cart drawer, but in practice we found this is not reliable.

Add to cart requests are prone to 429 errors inside the theme editor, and on top of that many themes simply do not work when you try to add an item to the cart from within the theme editor context at all.

The rate limiting side of this is covered in the ongoing thread on bot detection and 429s, where Shopify’s own status update notes that for false positives “there is not yet a complete solution”.

How this was already solved in checkout editor

The checkout editor solves the same problem by populating the preview with a default product, so a merchant can see and configure checkout blocks without manually building a cart first:

Because previewing cart blocks in the theme editor is this unreliable, apps are pulling configuration that belongs in theme app extension settings into their own embedded app iframe instead, where they can control the preview. That splits the merchant experience across two surfaces and works against the whole point of theme app extensions.

A proposed solution

What I would like: an optional deep link parameter, something like cartPreview, that renders the theme editor preview with one or more placeholder line items, example:
shopify://admin/themes/current/editor?context=apps&template=${template}&activateAppId={api_key}/{handle}&CART_POPULATE=true

This removes a whole class of support tickets, brings cart blocks in line with the preview experience that already works for product and collection templates, and sidesteps the bot detection problem entirely for this case since no storefront cart request would be needed.

Happy to share a concrete example of the flow if that helps.

@David_Arbias
I completely agree with this request.

We’ve run into the same issue when deep linking merchants to the Theme Editor for app blocks that live in the cart drawer or cart page. Since the preview always loads with an empty cart, merchants can’t verify whether the app block has been placed or configured correctly.

While asking merchants to manually add a product to the cart sounds like a workaround, it isn’t reliable in the Theme Editor. We’ve also experienced issues where add-to-cart requests either fail due to 429 rate limits or don’t work at all, depending on the theme.

The Checkout Editor already provides a much better experience by rendering a preview with a default product, allowing merchants to immediately see and configure checkout extensions. Having similar functionality in the Theme Editor for cart-related app blocks would significantly improve the merchant experience.

An optional parameter such as CART_POPULATE=true (or a similar preview flag) would be a great solution. It would provide a consistent preview experience, reduce merchant confusion and support requests, and eliminate the need for apps to build custom preview flows outside the Theme Editor.

This would be a valuable improvement for developers building Theme App Extensions.