Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
So I have attached a metafield for a specific product but to each of my products & if I change the metafield to the one I want under a different product it changes it under all of them. I thought the point of a metafield was so that you can have different items when using that field. Below in the pic, I originally had "Bunny Meadows" attached for the metafield but when I went under my other product & changed it to "Lavender Scarab" it changed it under all my products. Hopefully that makes sense.
Solved! Go to the solution
This is an accepted solution.
@SunandMoonTrade wrote:Each of the metafields I set up are all tied to a different product,
If I'm understanding what you've done and are trying to do the problem is "EACH" there should only be ONE metafield created and used for all products if you want to reference that specific metafield for the product it is connected to.
So instead of product.metafields.custom.bunny_meadows you'd have a single one product.metafields.custom.custom_product and in that in each individual product you would assign a different product.
Then in theme settings for the dynamic source use product.metafields.custom.custom_product that way on each page on the front end for each product you get the contents of it's own metafield product.metafields.custom.custom_product.
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
Save it and actually check it on the frontend, never trust the designer or the temp-url-previews system for final behaviors.
If using a dynamic source something is misconfigured probably.
Without ALOT more work it's a hard to what your doing, how were metafields setup, how were products setup, what theme is being used, has theme been customized, etc etc.
All resources(products,pages,collections,etc) that use a template get all the same section-settings for that template. Just like if you change the background color in theme-settings that affects the entire sites pages using those settings.
This is only different when a setting is a dynamic source consuming a metafield definition.
So if your just adding a product reference to a setting for a specific product template then that setting is static for ALL products.
If you have a metafield definition of the a product-reference type where different products in the admin are assigned different products and you are linking a setting to a dynamic source then yes the product should change based on that reference.
https://shopify.dev/themes/architecture/settings#dynamic-sources
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
So I did set up the metafields & connected the product I wanted to that metafield. Each of the metafields I set up are all tied to a different product, but, it still changes on my website what product is showing or it will be an "example product" to all but 1. The most recent metafield I connect is the only 1 that displays correctly. They even show that they are only connected to 1 product.
Hi, @SunandMoonTrade Hope you are doing well can you please share the code where you use these meta fields and also the store URL? Thanks.
This is an accepted solution.
@SunandMoonTrade wrote:Each of the metafields I set up are all tied to a different product,
If I'm understanding what you've done and are trying to do the problem is "EACH" there should only be ONE metafield created and used for all products if you want to reference that specific metafield for the product it is connected to.
So instead of product.metafields.custom.bunny_meadows you'd have a single one product.metafields.custom.custom_product and in that in each individual product you would assign a different product.
Then in theme settings for the dynamic source use product.metafields.custom.custom_product that way on each page on the front end for each product you get the contents of it's own metafield product.metafields.custom.custom_product.
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
Thanks Paul! It worked like a charm, I appreciate your help 🙂
By 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, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024