Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to enable metafields only for specific products

How to enable metafields only for specific products

iwritecodesomet
Visitor
1 0 2

Hello, 

 

I'm having some issues with metafields. 

I have three different collections of products. I've added metafield  named 'product weight' in the settings menu. The problem is that I only need to display it for the products in the first collection, other two collections do not need it. Is there a way to select metafields for specific products only and disable it for other products? Because now metafield is global and applies to all store products. 

 

Thanks

Replies 3 (3)

made4Uo
Shopify Partner
3852 717 1201

Hi @iwritecodesomet,

 

You can add and delete the metafield code. With your issue, you can achieve it in several ways. 

 

First Option:

You can add another metafield and set it to true or false for each product

 

Second Option: 

You can create a collection template and assign the metafield to should, but not on default template.

 

 

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
ConsciousCurate
Visitor
2 0 0

Hello. 

 

Could someone please explain how one does this? 

wizure
Visitor
1 0 0

Don't know if you are still looking for an answer. But here is what I've done. when I ran into a similar situation

GitHub