I WANT TO CHANGE PRODUCT TEMPLATE IN BULK HOW CAN I DO IT ??? PLEASE HELP
HOW CAN I CHANGE VIA API ANYBODY CAN 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
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.
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.
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.
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) :
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
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!
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Ă !