I WANT TO CHANGE PRODUCT TEMPLATE IN BULK HOW CAN I DO IT ???? PLEASE HELP

I WANT TO CHANGE PRODUCT TEMPLATE IN BULK HOW CAN I DO IT ??? PLEASE HELP

HOW CAN I CHANGE VIA API ANYBODY CAN HELP ??

Hello!

You can change Template for Products by using this app: Bulk Import Export Update with Excel.

There is a column “Template Suffix”, which you can use in the import as an update.

Maris

1 Like

You can also go to Shopify → Products → checkbox to select all products and then click ‘select all products’. Then click ‘edit products’ → click ‘add fields’ → select ‘template’. Then you can change the template for all products and click save. I know it’s not ‘bulk’, but faster than opening, editing and saving one by one.

14 Likes

You can multi select fields on the Bulk Editor - like a spreadsheet - so you can smash out lots of updates quite quickly.

The link below (assuming you are logged in) will shortcut you to the page with only title showing, template field, and 250 items.

https://shopify.com/admin/bulk?limit=250&resource_name=Product&order=title+asc&%2Ctemplate_suffix=&edit=template_suffix

7 Likes

Paybydaddy India

As others have mentioned, I find their answers far more convenient and do not require bespoke code for bulk updating.

However, since you also mention “change via API” you would need to use PUT /admin/producs/{id}.json and pass the template_suffix property when using Admin REST API. Since you’d like to perform batch updates, you’d first need to fetch the product IDs and then loop over them making those update calls - which is inefficient to say the least.

If you’re still intent on using an API to perform bulk updates, I suggest you look in to GraphQL Admin API’s productUpdate mutator and use GraphQL query batching to achieve same more efficiently (beware, even though batched, this will still cost you in terms of API call limits andyou might want to test beforehand).

Hope that helps answer the API related part of your question though I still think following any of the aforementioned answers would be better for this particular case.

2 Likes

This was very good, thanks!!!

JASON! You are THE MAN!!! this is awesome

If you have hundreds of products and don’t want to use a paid app, then this solution will save you time:

1) As Jason said, you can use this url to open the bulk editor (replace your-domain-here with your myshopify domain) :

https://your-domain-here.myshopify.com/admin/bulk?limit=250&resource_name=Product&order=title+asc&%2Ctemplate_suffix=&edit=template_suffix

2) Click F12 on your keyboard to open the developer console of your browser (or go in the browser settings and look for something like “web developer tools”)

3) Go in the “console” tab of the developer inspector and paste the following script:

let selectors = document.querySelectorAll('[name="product[template_suffix]"]')
for (let select of selectors) {
   select.value = "alternate";
   select.dispatchEvent(new Event("change", {"bubbles": true}));
}

You have to replace “alternate” with the suffix of your template.

4) Click SAVE and wait until everything is processed

3 Likes

Hi! I am trying to use this method, but it seems I can only do it in chunks (AKA. how many products it shows on the screen at a time.) Is there any way to make it do every single product I have filtered? Eg. all products in a tag?

You can drag the cells on the bottom left corner and then when you choose an option for the fist one it changes for every single cell. Thank you very much. That was a life saver man!

1 Like

Hi, I’m trying your solution but I’m getting an error: undefined. Any idea what I could be missing? I did replace “alternate” with the suffix of my template.

Thank you so much for this, @Jason . I would have been clicking in those fields one by one for all sorts of things. Four years later, it is still and A+ tip I never would have noticed.

Hi Jason and thanks in advance for all your help on the forums to date. I know its been ages since this post, however unfortunately the above link no longer works if you have variants on each product. Its shows all the variants (say 20) and you have to scroll for ages to change 1-5 products. Its been freezing up and finding it difficult to do this in bulk. The link above used to work and just showed the product title. Alas not sure if there is another solution?

Crazy expensive prices. Anything similar but free?

Thank you, Jason! You saved me! Appreciate your work.

Just passing by 3 years later. There’s a better way to do just that, some people including me just didn’t get it at first but the bulk editor can act as a spreadsheet. So in practice you’d have to do this:

Click on the first cell you want to edit, then scroll down to the last cell and shift + click on it. This should highlight the entire column. Then scroll back up to the initial cell you selected and change its value. All values will change at once. Here’s a screen capture: https://files.maxdesign.expert/2024/10/chrome_g4Nh2uLN96

Et voilĂ  ! :slightly_smiling_face: