App extension theme block regularly disabled unintentionally

Solved

App extension theme block regularly disabled unintentionally

el-iot
Shopify Partner
4 0 0

I have developed a Shopify App that brands can install and use to enrich their store. I used a theme extension app block to build it. Brands like the app and they install it, but whenever they change themes or redesign their site my app switches off (becomes disabled) and they need to manually switch it on again. I thought that theme extension app blocks were not supposed to do this (I thought they were supposed to persist). How can I fix this issue?

Accepted Solution (1)

Dotsquares
Shopify Partner
433 28 55

This is an accepted solution.

Hi @el-iot 


Sets to follow to resolver the issues_

Theme App Extension Auto-Install Prompt

  • When your app detects a theme change, you can prompt the merchant to re-enable the app block with one click.
  • Use the theme_app_extension APIs to detect available themes and guide merchants to install the block in the new theme.

Theme Detection & Notification

  • In your app admin dashboard, use the Shopify Admin API to detect when the current published theme changes (GET /admin/api/2023-10/themes.json) and notify users:
    • “It looks like you've changed your theme. Please re-enable the app block.”
  • You can even trigger a banner/alert in the app to notify them immediately upon detection.

Embedded Setup Wizard

  • Include a setup wizard inside your app dashboard that allows users to re-insert your app block into the current theme sections programmatically using theme_app_extension settings schema.

Educate Users

  • Add a FAQ or in-app banner letting merchants know.




Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio

View solution in original post

Replies 4 (4)

Dotsquares
Shopify Partner
433 28 55

This is an accepted solution.

Hi @el-iot 


Sets to follow to resolver the issues_

Theme App Extension Auto-Install Prompt

  • When your app detects a theme change, you can prompt the merchant to re-enable the app block with one click.
  • Use the theme_app_extension APIs to detect available themes and guide merchants to install the block in the new theme.

Theme Detection & Notification

  • In your app admin dashboard, use the Shopify Admin API to detect when the current published theme changes (GET /admin/api/2023-10/themes.json) and notify users:
    • “It looks like you've changed your theme. Please re-enable the app block.”
  • You can even trigger a banner/alert in the app to notify them immediately upon detection.

Embedded Setup Wizard

  • Include a setup wizard inside your app dashboard that allows users to re-insert your app block into the current theme sections programmatically using theme_app_extension settings schema.

Educate Users

  • Add a FAQ or in-app banner letting merchants know.




Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio
el-iot
Shopify Partner
4 0 0

Hi Dotsquares!

 

Would we require the read_themes scope for these solutions? We do not currently have this.

 

Thanks,

Elliot

Dotsquares
Shopify Partner
433 28 55

Hi @el-iot Yes you will need this, let me know if you need any more help.

Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio
el-iot
Shopify Partner
4 0 0

Thank you! I do have one general question. I have not seen any other extension developers who are having this issue: it seems quite uncommon. Do you know how major extension developers avoid having their extensions turned off when themes change? Do they use a different framework or can they automatically inject the extension again somehow?