Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have an app extension am working on and added a Product metafields - that of a product ref (custom.upsell). The app extension which I run in dev mode, shows up correctly in my block editor and all works fine if I use say an integer value but when I choose the metafield to be a product I cannot fetch the data such as the title.
According to many posts once could get say the title as:
{% assign upsell = product.metafields.custom.upsell.value %} {{ upsell.title }}
But that is blank. I have been at this for hours and tried sooooo many variations. I can get the "gid://...' printed and type which is a product_reference. Some posts say to use all_products[...] but thats a no go as well.
This problem is seen in other posts that say you need to update the graphQL query to fetch the desired fields but since this is an app extension I am not working with this.
I just tried directly in theme same result:
{% assign upsell = product.metafields.custom.upsell.value %} <h2> {{ upsell.title }}</h2>
Any ideas?
Solved! Go to the solution
This is an accepted solution.
Well I had to create a new store. Not totally sure what was up with my dev store - it was old and just added Dawn. I created a new store with demo content and was able to get it to work. Gah.
This is an accepted solution.
Well I had to create a new store. Not totally sure what was up with my dev store - it was old and just added Dawn. I created a new store with demo content and was able to get it to work. Gah.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025