Liquid, JavaScript, themes, sales channels
Hi,
I have the following:
Solved! Go to the solution
This is an accepted solution.
Hi @molten_frog,
Please change code:
{% assign product_image = product.selected_or_first_available_variant.metafields.my_fields.image_1 %}
=>
{% assign product_image = product.selected_or_first_available_variant.metafields.my_fields.image_1.value %}
Hope it helps!
This is an accepted solution.
Hi @molten_frog,
Please change code:
{% assign product_image = product.selected_or_first_available_variant.metafields.my_fields.image_1 %}
=>
{% assign product_image = product.selected_or_first_available_variant.metafields.my_fields.image_1.value %}
Hope it helps!
You are an absolute hero. Not the first time you have helped me 🙂
Hi @molten_frog,
If you have any difficulty, you can contact me.
Happy to help you.
Thanks @LitExtension I really appreciate it.
I have uploaded an mp4 to variant_media_1. And similar to the code above I have done the following:
Hi @molten_frog,
The generic_file object can be returned when a metafield has a file_reference type. If the file_reference is not an image of type JPEG, PNG, or GIF, then it will return a generic_file.
Refer https://i.imgur.com/8iiOqCc.png
Hope it is clear to you.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024