Can I setup a metafield to appear only on specific products?

Can I setup a metafield to appear only on specific products?

MellowMiwi
Shopify Partner
1 0 0

Can I only add a metafield to a particular set of products???? For example by product type? Lets say, I have a product type of dust collectors that I would like to add a "filter bag" metafield to with a list of values, but I only one it to appear on those dust collectors and not on other products like drills, etc. I appreciate any help.

Replies 2 (2)

PaulNewton
Shopify Partner
7746 679 1613

Hello @MellowMiwi 👋 For the backend admin read the docs , in the admin pinned metafields show for ALL products

 https://help.shopify.com/en/manual/custom-data/metafields/pinning-metafield-definitions 

 

The closest workaround is using metaobjects to indirectly have metafields related indirectly to objects such as products but this means they are no longer dynamic sources for the theme editor, or filters for storefront search.

 

For the frontend to control which filters show for which collections of products this depends on theme, and any apps used, any conventions, or theme customizations etc etc etc

Again see the manual https://help.shopify.com/en/manual/online-store/themes/customizing-themes/storefront-filters?q=store... 

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Shadab_dev
Shopify Partner
1426 73 154

Yeah if you have just like 2 3 of them you could make different product templates for them. Or just make one different product templates for dust collectors and metafield value to it. 

 

Or you can edit code to look for dust collectors and render the metafield value.

 

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.