Can I preserve section settings when migrate from liquid to json template?

sillycube
Shopify Partner
693 16 100

When I read this migration guide - Migrating a theme to Online Store 2.0, It mentions that I have to delete my liquid templates and create new json templates (step 4 & 5). But what about the section settings input by users?

How can I preserve the settings or the users have to reinput all settings again?

I try to change section settings on the liquid template. After that, I delete it and create the json template. But the section settings are lost. 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
Replies 2 (2)
eballeste1
Excursionist
23 4 14

Shopify stores the data in the actual json template file. If you are using sections that don't use dynamic sections (sections with presets; when used these sections get saved into the json file with hashed id's as keys), you can maybe manually recreate your pages by copy/pasting from the settings file to this new template file. Super tedious but I don't see this happening in an automated way with the state of the current admin's UI.

sillycube
Shopify Partner
693 16 100

Thanks @eballeste1 

I realize that the settings data is moved to the json template after I open the thread.

I try to copy the setting data to my json template and it works. Unfortunately, there are more than a hundred users for my app. I can't do manually for them

I think of an automated way like this:

  1. Use asset api to get setting data of the theme
  2. Parse and Copy the section setting data to my json base template
  3. Delete the existing liquid template
  4. Upload the latest json template with setting data 

Hope it will work. I'll try it tmr

I don't understand why the Shopify guide doesn't mention data migration at all. This part is super important imo

 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview