App reviews, troubleshooting, and recommendations
Hi everybody,
I just updated my app to use app blocks with the theme-app-extension. I have three environments for my app: local, stage, live.
Now I can only use theme-app-extension for one app. But I use the same repo for all three stages. This leads to the fact that I now have three directories in my project for my three different theme-app-extension environments. I also have to push each app-extension separately, which is very very inconvenient.
Do you have any suggestions or a better workflow on how to tackle this problem?
Thank you!
Lee
Solved! Go to the solution
This is an accepted solution.
Have you tried using the "Development Store Preview" functionality for theme app extensions?
https://shopify.dev/apps/app-extensions#app-extension-versioning
From your Shopify Partners account, navigate to:
App > Extensions > Select your Theme App Extension > Enable the "Development Store Preview" flag.
Then create a new version for your app extension, which will only be applied to development stores until you click "Publish" to propagate it to production stores.
You shouldn't need separate app repos, and can just run
shopify extension push
as your 'build' command to test changes on the development store.
(Getting the changes to refresh quickly is more annoying, as what causes Shopify to purge the internal cache for the app block is a bit unclear; I've found that loading the Online Store Theme Preview from your Admin account is reasonably reliable at purging the cached version of the dev store app block files.)
This is an accepted solution.
I think following Github issue clearly matches with issue you are having.
https://github.com/Shopify/shopify-cli/issues/1387
This is an accepted solution.
Have you tried using the "Development Store Preview" functionality for theme app extensions?
https://shopify.dev/apps/app-extensions#app-extension-versioning
From your Shopify Partners account, navigate to:
App > Extensions > Select your Theme App Extension > Enable the "Development Store Preview" flag.
Then create a new version for your app extension, which will only be applied to development stores until you click "Publish" to propagate it to production stores.
You shouldn't need separate app repos, and can just run
shopify extension push
as your 'build' command to test changes on the development store.
(Getting the changes to refresh quickly is more annoying, as what causes Shopify to purge the internal cache for the app block is a bit unclear; I've found that loading the Online Store Theme Preview from your Admin account is reasonably reliable at purging the cached version of the dev store app block files.)
Hey @bishpls,
thank you very much, yes that pretty much answers my question.
But now that leads me to a new question:
I basically have 3 different apps in my partners dashboard. One for local development, one for staging and for production.
Based on your answer it seems like you don't have those different environments or stages, or there might not even be a need for that.
May I ask you how do you manage different environments?
That's a good question, I was also wondering that.
In my case, I had to create another app just for local development since Shopify doesn't offer option to input URL for development (after app is published).
So the accepted answer doesn't really solve the issue with multiple environments for me.
Unless I'm missing something.
This is an accepted solution.
I think following Github issue clearly matches with issue you are having.
https://github.com/Shopify/shopify-cli/issues/1387
Hey @AvocadosLab, thank you very much! yes that completely matches my question.
And it's also scary to see, that there haven't been any updates on that issue as of now. It looks like this will continue to be an issue.
Best regards
Lee
I have a separate branch for my development and production stages.
I have a different app for my development and production stages. This allows me to have one theme extension app source code, but I can different settings in the .env file:
Development:
SHOPIFY_SB_USER_EXTENSION_APP_V1_ID=[ID]
Production:
SHOPIFY_SB_USER_EXTENSION_APP_V2_ID=[ID]
└── extensions
└── my-theme-app-extension
├── assets/extension.js
├── blocks/extension.liquid
├── snippets
├── locales
├── package.json
└── shopify.extension.toml
In today’s interview, we sat down with @BSS-TekLabs to discuss practical strategies for...
By JasonH Nov 13, 2024The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024