All things Shopify and commerce
The store I am building has a wide variety of products with the product pages being heavy on product information (populated via metafields); however, the metafields required for some products don't apply to the rest of the products in my store. For example:
Is there any way to specify which metafields appear on certain product pages in the admin? Or do all metafields need to appear for every single product on the site?
I hope this makes sense. Thanks!
Solved! Go to the solution
This is an accepted solution.
I see what you're getting at! In Shopify's admin interface, the default behavior is to show all metafields for every product, which can be overwhelming if you have many metafields defined. However, as of now, Shopify does not provide a built-in way to conditionally hide metafields in the admin product page based on product type.
{% if product.metafields.custom.benefits %}
<div class="product-benefits">
<h3>Benefits</h3>
<p>{{ product.metafields.custom.benefits }}</p>
</div>
{% endif %}
{% if product.metafields.custom.features %}
<div class="product-features">
<h3>Features</h3>
<p>{{ product.metafields.custom.features }}</p>
</div>
{% endif %}
I know that I can customize what is displayed on the front end of the site. I am talking about the product ADMIN.
I want to avoid showing every single metafield (potentially 20+ in my store) when only a few apply to each product type.
This is an accepted solution.
I see what you're getting at! In Shopify's admin interface, the default behavior is to show all metafields for every product, which can be overwhelming if you have many metafields defined. However, as of now, Shopify does not provide a built-in way to conditionally hide metafields in the admin product page based on product type.
I figured as much. Thanks for the confirmation!
You're welcome!
Hi @MadeByFrom 👋 Currently no such feature for conditional metafield definition pinning.
Either a metafield definition is pinned and shows for all products, or unpinned and only show in the metafields list clicked through from the admin for the resources(products,collections,etc).
Make sure to file a feature request, https://help.shopify.com/en/support/support-type
Some workarounds are:
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
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024