FROM CACHE - en_header

Online Store 2.0 Multi-store Github Theme Setup

timd
Shopify Expert
98 3 44

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

Replies 7 (7)
HiddeISM
New Member
2 0 2

We have the same issue. Do you have any updates on this?

timd
Shopify Expert
98 3 44

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

timd
Shopify Expert
98 3 44

I've found there is a wild card feature for Theme Kit: https://github.com/Shopify/themekit/issues/36

V1nk0
Shopify Partner
6 0 3

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.

alexsuarez
New Member
3 0 8

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. 

JohnBarry92
Shopify Partner
1 0 0

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 

Philip2
Shopify Partner
1 0 0

Did anyone come up with a good solution for this?