hi i am using fabric magic theme and i have ai to develop product video intend but its not working as intended bcz it cannot be added in collection section in them theme
can anyone help me in sorting this out
hi i am using fabric magic theme and i have ai to develop product video intend but its not working as intended bcz it cannot be added in collection section in them theme
can anyone help me in sorting this out
@venusgemsindia collection section code is to show the products, you can add video section or custom liquid section on home page to show your video by putting video code into it.
If you need it in collection section only then need to add code in collection liquid template.
Hii @venusgemsindia,
There are three solution options:
Option 1: Use a Shopify App
There are apps designed to add videos to collection pages:
Option 2: Custom Code
snippets/card-product.liquid
Example (simplified):
{% assign video = product.media | where: 'media_type', 'video' | first %}
{% if video %}
{{ video | media_tag: autoplay: true, loop: true, muted: true }}
{% else %}
{{ product.featured_image | image_url: width: 600 | image_tag }}
{% endif %}
Note:
Option 3: Metafield-Based Video
If your AI tool outputs a hosted video:
card-product.liquid<video> only when the metafield existshow to add it in collection liquid template
@venusgemsindia upload video to content, copy the URL link.
Then go to edit code option of the theme and open collection.liquid page
then you can use html video tag to copy paste video link and it should work fine, you can show video at top or the bottom of the collection products. But since you are editing the template, it will be shown on all collection pages
Hey @venusgemsindia,
Could you please share your store url and password [if applicable] so that I can take a look and provide you the solution code.
Thanks
here is our shopify url
@venusgemsindia did you try to add video in collection template?
Hello!
You can add a video to a collection section in your theme editor by either using your theme’s built in video block, or if your theme has a ‘custom liquid’ block you can paste in the video embed from your video platform. If you are hosting your video on YouTube, you can right click the video on YouTube and click ‘Copy embed code’. Then, paste that code into your ‘custom liquid’ block.
I’ve released an app that can help easily embed YouTube videos in particular on your store by simply pasting the video url into the app, without messing with code: UWidget: YouTube Widgets
Let me know if this works for you!