Migrating custom theme templates

We have created some customized templates for our store - for example, a separate template for specific products which has additional blocks configured. This custom template is based off the “default product” template of our theme (Empire by Pixel Union).

We use the Theme Updater app to perform the basic theme upgrade because it carries over all our theme configuration settings. But obviously there is no way for the theme updater to update the custom templates other than to copy the custom template over from the old version of the theme, which means it effectively doesn’t get the theme updates.

We can manually re-create the custom template from the new “default product” template, that is easy. But the question is - is there an easy way to update the template for 100 odd products?

If a template does not exist, products don’t show that template assignment in their template setting drop down, but they still retain their template setting. These allows for the following work arounds…

If the theme upgrade did not copy over the existing custom template:

  1. Simply create and configure a new custom template based on the new theme’s default template, and give it the same name as the old custom template.

If the theme upgrade copied over the old custom template:

  1. Delete the old custom template (by editing the theme code)
  2. Create and configure a new custom template based on the new theme’s default template, and give it the same name as the old custom template.