New Shopify Certification now available: Liquid Storefronts for Theme Developers

Verify 2.0 Theme Support for Shopify App

Solved
JayAdra
Shopify Partner
52 5 11

Hi there,

 

I'm implementing this process for my app:
https://shopify.dev/apps/online-store/verify-support#verify-support-for-app-blocks

 

I am trying to determine if the customer's theme supports app blocks. The code seems to be working fine, however I'm confused because the default 2.0 theme (Dawn) is outputting:

 

"All desired templates support sections everywhere!
Only some of the desired templates support app blocks."

 

This doesn't seem right? I would have assumed that the reference theme has full support for app blocks? I am targeting "product" and "cart" templates specifically.

 

Does this mean I can look at the first templates check only, and not the second one that checks for @app support? I seem to be able to add my app block to the cart page, even though it apparently doesn't support them.

 

Any clarification around this would be awesome, as I'm using it to determine whether or not to register ScriptTags.

 

Thanks,
Jay.

Accepted Solution (1)
JayAdra
Shopify Partner
52 5 11

This is an accepted solution.

I never found much info surrounding this, but ended up just trusting the first check (do the templates support sections), and skipping the second part.

 

So far haven't seen any issues with detection using this method. Still would love to hear if anyone has found otherwise or has other solutions.

View solution in original post

Replies 4 (4)
JayAdra
Shopify Partner
52 5 11

This is an accepted solution.

I never found much info surrounding this, but ended up just trusting the first check (do the templates support sections), and skipping the second part.

 

So far haven't seen any issues with detection using this method. Still would love to hear if anyone has found otherwise or has other solutions.

axis80
Shopify Expert
22 1 8

I'm not convinced that the example code at https://shopify.dev/apps/online-store/verify-support#verify-support-for-app-blocks is correct.  I have been using the second check (which looks for blocks of type '@app') and getting results that do not line up with what I'm seeing in the theme editor.  Like, it will report that some templates support app blocks when they don't actually work in the editor, and vice versa.

JayAdra
Shopify Partner
52 5 11

Yeah I just skipped the second check and things have worked well for me. I wish they would revise their example code for this.

Knert
Shopify Partner
2 0 1

I know I'm a little late to the party here but this whole process is appalling to me. This is bound to break in the future. Shopify should have created an API endpoint to do this for us. As soon as any one of those magic strings change (i.e. main- , sections) or the magic [1] index on ${main[1].type}, all of our installs will break.