Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024