Solved

Saving Online Store 2.0 Development Theme Customizations (settings_data.json)

iambrianclark
Shopify Partner
21 3 13

While working on a development theme (via CLI "shopify theme serve"), the frontend customizations don't persist after serving since the dev theme doesn't update my local code's settings_data.json file.

What's the best practice for this? Is there a way to automatically update settings_data.json via the CLI while serving the dev theme? Do I need to manually copy/paste the settings_data file from the frontend code editor when I make changes in the theme editor?

Accepted Solution (1)
iambrianclark
Shopify Partner
21 3 13

This is an accepted solution.

@Syzco Yes! Well, sort of.

After using shopify theme serve and making your customizations in the admin, just do a shopify theme pull and you can pull your theme changes from the development theme (it'll be last on the list) which will update your local code with the updated theme customizations.

My basic process looks like this now:

  1. git pull any changes to the repo (I use a shop-dev branch that I also have loaded on the store as a visible dev theme for others)
  2. Shopify theme pull from live theme (in case any new customizations were made to the live store)
  3. shopify theme serve and make any changes to the dev theme
  4. shopify theme pull from the dev theme to make sure my local code matches the dev theme
  5. git push to my shop-dev branch
  6. shopify theme push to the live store

I originally had two different git branches, a shop-dev and a shop-production, but between theme customizations and other differences between the themes I kept having a ton of merge conflicts, so I got rid of shop-production and just use a non-github theme as my live theme. I find it's easier to control that way.

I'm definitely open to suggestions on how to optimize this workflow though.

View solution in original post

Replies 2 (2)

Syzco
Visitor
1 0 0

@iambrianclarkwere you able to find a solution to this? I'm running into the same issues...

iambrianclark
Shopify Partner
21 3 13

This is an accepted solution.

@Syzco Yes! Well, sort of.

After using shopify theme serve and making your customizations in the admin, just do a shopify theme pull and you can pull your theme changes from the development theme (it'll be last on the list) which will update your local code with the updated theme customizations.

My basic process looks like this now:

  1. git pull any changes to the repo (I use a shop-dev branch that I also have loaded on the store as a visible dev theme for others)
  2. Shopify theme pull from live theme (in case any new customizations were made to the live store)
  3. shopify theme serve and make any changes to the dev theme
  4. shopify theme pull from the dev theme to make sure my local code matches the dev theme
  5. git push to my shop-dev branch
  6. shopify theme push to the live store

I originally had two different git branches, a shop-dev and a shop-production, but between theme customizations and other differences between the themes I kept having a ton of merge conflicts, so I got rid of shop-production and just use a non-github theme as my live theme. I find it's easier to control that way.

I'm definitely open to suggestions on how to optimize this workflow though.