Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have a number of clients with multiple regional stores that share the same theme but have different settings_data.json files. This wasn't a problem with ThemeKit because we could exclude files in the config.yml file.
But as I begin to migrate stores to use the new Shopify Github and Online Store 2.0 functionality I'm not sure how to maintain a theme across multiple stores with different theme settings and json data.
Adding the templates/* to .gitignore removes the files from the theme on Shopify so I'm not sure if there is any alternative to retain json data files on the Shopify store theme, but have them untracked in the git repo
We have the same issue. Do you have any updates on this?
I haven't been able to find a solution yet and its a bit tricky even with Theme Kit because I need to add each .json template to the ignore list of each regional store. When its a client with 5+ regions, dev and production environments for each and a ton of json templates it becomes quite a long config file and a lot of keep on top of.
It would be great if there was a wildcard *.json ignore rule for Theme Kit
I've found there is a wild card feature for Theme Kit: https://github.com/Shopify/themekit/issues/36
I have also tried to do this with the Shopify Github Integration, as I have a client with multiple stores (one for each sub-brand) using the exact same theme (but of course different configuration like logo, colours, fonts, etc.).
Unfortunately it seems impossible to have this set-up, as Shopify (event with settings_data.json in the .gitignore file) pushes the settings_data.json to the repository each time the configuration of one of the shops is changed. As this adds/changes the settings_data.json in the repository, this configuration is then applied to all stores using the repository (effectively giving all stores the configuration of the shop that was last changed).
Other than going back to ThemeKit, which enables to exclusion of the settings_data.json, I've found no solution and ended up creating one repository for each store so that I can use the GitHub-way. So I have multiple repositories with exactly the same files except for the settings_data.json 😞
I guess the Shopify Github Integration was never meant to maintain a theme that is in use by multiple stores.
Well for that, you need an extra hand - you can use github with workflows. (1 repository in all stores with workflow configuration). For example: when you push or merge to master it will copy the settings json with a condition to push the settings json in a correct region.
Did you end up sticking with Themekit rather than using the Shopify CLI with online store 2.0? We're in the exact same position where data used to be stored in settings_data.json in store 1.0 and we ignored that file in the themekit_ignores file. With data now been stored in the templates JSON object we're ignoring the entire templates directory in our .shopifyignore file to allow us to upload new features directly to each store. We wouldn't be able to store the template JSON in our git repo (we use bitbucket) due to the relative image paths in each region. A lot of our clients tend to duplicate the production theme, make theme amends and redeploy the new theme therefor content can be different a lot of the time. We track theme version, rather than concerning ourselves on content assigned to that theme. Any findings you've come across would be much appreciated
Did anyone come up with a good solution for this?
I've not tested this out yet, but this seems like a solution: https://community.shopify.com/c/technical-q-a/multiple-stores-using-same-github-branch/m-p/1607101/h...
It requires some extra work, but I think this should work.
FOUND A SOLUTION!
I've been trying to make this work for days on end, until I found this custom GitHub action built exactly for this:
https://github.com/Jamiemccleave/shopify-multi-store-deployer
Wish it was more known!
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024