How To Show The Selected Variant Images Only 2024 - FREE TUTORIAL (Multiple Images Per Variant)

This is an upgraded version of our previous customization to show the selected variant images only, incorporating your feedback from the last video!
This video took quite a bit of time to, so if you liked it please like and subscribe - it helps us keep making videos like this.
----------------------------
📄 Code for this video can be found here: theprompted.co/blogs/tutorial...
🎥 FIX for v14 and v15 themes: • Only Show Selected Var...
🚀 Want a FREE personalized action plan to help increase your conversion rate? Complete this simple form: theprompted.co/free-action-plan
👉 Want to hire us for personalized help? Book a consult call: theprompted.co/pages/hire-us
▶️ Subscribe for more videos like this ➡ @theprompted
----------------------------
TIMESTAMPS
00:00 - What we’re customizing in this video
01:01 - Demo of customization
05:09 - Adding the customization to your theme code
18:26 - Explanation: grouping your images together
20:33 - Using the Metafield grouping method
28:39 - Using the filename grouping method
31:48 - Using the alt text grouping method (similar to filename method)
34:35 - Why do we need to manage all our images like this?
----------------------------
#shopify #tutorial #ecommerce
Themes: Dawn, Refresh, Craft, Studio, Publisher, Crave, Origin, Taste, Colorblock, Sense, Ride, Spotlight
----------------------------
Music track: lucid by massobeats
Source: freetouse.com/music

Пікірлер: 128

  • @yoaz3149
    @yoaz31493 ай бұрын

    Great work again!

  • @otto9695
    @otto96953 ай бұрын

    Thanks so much!

  • @user-pq8xj6wp2l
    @user-pq8xj6wp2l3 ай бұрын

    Superb... Each step is just wow ❤ now looking for a zoom lightbox

  • @sireveman

    @sireveman

    3 ай бұрын

    Insane that the biggest ecommerce software, has a lightbox from the early 2000s, what a joke.

  • @alhasnain1071
    @alhasnain10712 күн бұрын

    please make this full video again with full guidance

  • @sireveman
    @sireveman3 ай бұрын

    An updated version for theme version 14 would be awesome. As far as I can see, only the global.js code needs to be altered.

  • @marcogiavitto5581

    @marcogiavitto5581

    2 ай бұрын

    I'm exactly at that step, and I just noticed that it's different. Were you able to fix it?

  • @sireveman

    @sireveman

    2 ай бұрын

    @@marcogiavitto5581 Nope.

  • @playstoreguy7673

    @playstoreguy7673

    2 ай бұрын

    ​@@marcogiavitto5581 hey man Did you find any way to solve it ?

  • @marcogiavitto5581

    @marcogiavitto5581

    2 ай бұрын

    @@playstoreguy7673 nope haha

  • @theprompted

    @theprompted

    Ай бұрын

    Looks like Shopify has changed the code and it affects this customization. Will be working on a new version of this!

  • @sireveman
    @sireveman3 ай бұрын

    Thank you for your work and providing it for free. Such a joke that we have to do this and multiple images per variant is not possible with default shopify.

  • @wildatheart15

    @wildatheart15

    Ай бұрын

    i know!

  • @dekatool
    @dekatool16 күн бұрын

    Your videos have been very helpful. I'm hoping for a version of this code for version 15 of dawn. Keep up the good work!

  • @theprompted

    @theprompted

    16 күн бұрын

    v15 update just came out :) check it out here: kzread.info/dash/bejne/m2h4sq2DXd2wl7w.html

  • @dekatool

    @dekatool

    16 күн бұрын

    @@theprompted Awesome! You guys are great. Perfect timing!

  • @genius_maker
    @genius_maker3 ай бұрын

    Hello Sir! You're doing a fantastic work. Thank you so Much I have a request if possible please make a small video on this. I have disable add to cart button on my store. I want to keep only "Buy it Now" button on the product page and make this Buy it Now button STICKY. Please make a video on this. I would really help me. Thanks

  • @zahidshaaki
    @zahidshaaki3 ай бұрын

    Great always!! Can you please create an "image with text" section with liquid?

  • @theprompted

    @theprompted

    3 ай бұрын

    Isn't there already one in Dawn and other free Shopify themes by default? Is there something else about it that you're looking for?

  • @roiseaux
    @roiseaux3 ай бұрын

    Thank you! Would you be able to post an updated version for swatches in Dawn 13: on product page and on collection page's product grid? The old videos are outdated, and even with the written instructions, I was not able to implement them. I think while we wait for Shopify to roll out with the swatch feature, we really need a better solution, and I think your content has consistently been the most helpful. Would really appreciate an update! Thank you!

  • @theprompted

    @theprompted

    3 ай бұрын

    Thank you! I plan on doing this - stay tuned!

  • @MStatus-jn9tj
    @MStatus-jn9tjАй бұрын

    Thank you very much. It works, but how can I put color switches on the collection for the same version and have it clickable?

  • @theprompted

    @theprompted

    Ай бұрын

    Yes, you can check out the newest (version 3) of collection swatches here: kzread.info/dash/bejne/oI6pps2fXbeYn8o.html

  • @adeisaac
    @adeisaac3 ай бұрын

    Very generous and very helpful....thanks again. As a side note, I have been working on a customer form but can't get the form to submit customer metafields...any ideas. Thanks

  • @theprompted

    @theprompted

    3 ай бұрын

    You're welcome! I don't think I'm quite following what you're attempting to do? Is it that you want customers to submit a form that can add metafields to their user profile?

  • @adeisaac

    @adeisaac

    3 ай бұрын

    @@theprompted Exactly. Thank you

  • @theprompted

    @theprompted

    3 ай бұрын

    What problems are you running into? If it's creating the metafields, then you should use the Shopify Customer API to create them (shopify.dev/docs/api/admin-rest/2024-04/resources/customer)

  • @enriquepardomeca
    @enriquepardomeca2 ай бұрын

    Great job! Unfortunately it doesn´t work on theme version 14 😥

  • @theprompted

    @theprompted

    Ай бұрын

    Yes - looks like Shopify has changed the code and it affects this customization. Will be working on a new version of this!

  • @roiseaux
    @roiseaux3 ай бұрын

    Is there a way to create a static copy of any section (image banner, multicolumn, rich text, etc), and define default content, so that everywhere you add this section (home page, collection page, cart, etc), this block will always show that default content? (without using metacontent) And if you change the default content of this section on one page, it should also auto-update all other copies of this section universally across your store. Is this possible? Thank you!

  • @theprompted

    @theprompted

    3 ай бұрын

    Is there a reason you don't want to use metacontent? You could hard code this, but I think it would be better to map your content to a metaobject. The metaobject is not like a metafield - it stands alone and can be used across different pages like you want. And if you ever want to change it, you can simply change the metaobject. Without doing it that way, you'll probably have to create a section that has hardcoded content.

  • @jayukekan3778
    @jayukekan37782 ай бұрын

    please make a video header underline hover effect on shopify down theme

  • @theprompted

    @theprompted

    Ай бұрын

    Dawn by default already has a hover effect on the menu headers. Is there something more specific that you're looking for?

  • @User1-pe9ce
    @User1-pe9ce3 ай бұрын

    For the thumbnails and thumbnail carousel, when adding the code for the second list tag in the product-media-gallery file, you instruct to insert the "featured variant image" code rather than the "remaining variant images" code. Was that intentional?

  • @theprompted

    @theprompted

    3 ай бұрын

    Good catch! What you're seeing there is an error with the video editing. Sorry about that. The second element should be using the "remaining variant images".

  • @swannfourmanoy6961
    @swannfourmanoy69613 ай бұрын

    Hello, thank for the Great content. iI have a problem when switching to an other variant on the product page , the main picture is updating but non of the extra pictures for this variant are showing (no thumbnail at all). When refreshing the page tho everything is showing correctly showing and the all the thumbnails appear. I thought it might be a problem with how i enter the code for the JS part. I redid it a couple of time but still cant find where the problem is from. Any help for this please ?

  • @theprompted

    @theprompted

    3 ай бұрын

    I agree that it's likely related to the js. It's possible you forgot to add the attributes to the elements (ex: data-variant-grouping), which is necessary to pass the information to the js to read and use.

  • @michelklaasen

    @michelklaasen

    15 күн бұрын

    @@theprompted Hey, thanks for the awesome tutorial(s)! I'm having the same situation here. I've got it to work with the metafields, but the images only show up correctly after refreshing the page. Selecting a different variant pill does not update the images. Any tips? I think I followed the tutorial to the T. I assumed it'd have to do with the updatemedia js function, but I'm not a coder @swannfourmanoy6961 - have you found a solution for this?

  • @MyRatedApps
    @MyRatedAppsКүн бұрын

    is it possible to do this with double variant so for example i am working on a site with suitcases but there are different images for color and for sizes is it possible to group images based on 2 meta fields?

  • @SK-kn3ov
    @SK-kn3ov3 ай бұрын

    Is it possible to code so that only certain customer segments can add something to their cart? I dont want to pay for locksmith, and i want to items to still be visible, not hidden Love your vids!

  • @theprompted

    @theprompted

    3 ай бұрын

    Thank you! That's an interesting suggestion, I noted it down.

  • @gr_tarik1410
    @gr_tarik14103 ай бұрын

    Jo i have a proboem when i make the metaobject so the file grouping it just let me choose one instead of more

  • @theprompted

    @theprompted

    3 ай бұрын

    You'll want it to be a "list of variants" instead of just "one variant" and "list of files" instead of "one file". You can re-watch the instructions at 22:05 to see the settings.

  • @FaysalEcommerce
    @FaysalEcommerce2 ай бұрын

    Hey, can you make a video for how to show image variants on the featured collection section (product cards) when we click on variants then will the image be changed? thanks, many support

  • @theprompted

    @theprompted

    Ай бұрын

    Yes - you can check this video out: kzread.info/dash/bejne/qKOKtbh-h7rRnaw.html

  • @pkalita2668
    @pkalita26683 ай бұрын

    Is it suppose to work Sense theme also? I tried with Sense theme but its not working. Even though I have added red and white variant out 7 variants I have but only one image from white variant shows up irrespective of any variants I select .

  • @theprompted

    @theprompted

    3 ай бұрын

    Yes, it works with the sense theme too. If the images aren't changing with your variants, then it's likely the js portion that wasn't added properly. Did you create the changes in the global.js file? If it's still not working, what I suggest is to install a fresh new version of Sense and try it all over again from scratch. If you get a different result it will help you troubleshoot what may have gone wrong the first time around.

  • @RonTheGod
    @RonTheGod2 ай бұрын

    I have products that have images with different sizes and colors. Are you able to do this for multiple variant options? In this video, it only works for one: color. I need size AND color.

  • @theprompted

    @theprompted

    2 ай бұрын

    That definitely would be a useful addition to this customization - I'll have to look into that

  • @RonTheGod

    @RonTheGod

    2 ай бұрын

    ​ @theprompted Found an app for it. It's called "Variant Image Wizard + Swatch"

  • @sireveman
    @sireveman3 ай бұрын

    When uploading a webm video. It works for the thumbnails, but the lightbox will show all videos, no matter what alt-text we use. Do you have a suggestion for a fix or where we should start looking? Thanks!

  • @theprompted

    @theprompted

    3 ай бұрын

    Ah good catch. Yes, it currently only works for images. Here's my suggestion: look for the video element being used in product-media.liquid and add the classes "product-modal-image{% if hide_image %} hide-image{% endif %}" to it.

  • @sireveman

    @sireveman

    3 ай бұрын

    @@theprompted That you very much, it worked with this updated line:

  • @yoaz3149
    @yoaz31493 ай бұрын

    And what about changing the variants name in to squere pictures :)

  • @theprompted

    @theprompted

    3 ай бұрын

    Not sure what you're referring to. Could you elaborate?

  • @VABianne_2023
    @VABianne_2023Ай бұрын

    Trade theme V15 would be nice 😊😊 Thank you in advance

  • @theprompted

    @theprompted

    29 күн бұрын

    We're working on a v15 compatible version!

  • @VABianne_2023

    @VABianne_2023

    29 күн бұрын

    Looking forward to it (excited 😁😁). Thanks in advance 😊

  • @theprompted

    @theprompted

    16 күн бұрын

    v15 fix was just released, you can check it out here: kzread.info/dash/bejne/m2h4sq2DXd2wl7w.html

  • @wasabiboucht4191
    @wasabiboucht41912 ай бұрын

    Hello, I have a problem, everything works fine, but the only problem is that I cannot click on any variant image, which means that I cannot change the image (I only see the featured image, and when I click on another image in the thumbnails, nothing happens). Could you help me?

  • @theprompted

    @theprompted

    2 ай бұрын

    What I suggest is to install a brand new version of your theme (ex: Dawn) as a test environment, and trying the steps again from scratch. If you get a different result, then likely there was an issue in your installation - and you can work backwards from there to find what may have gone wrong the first time.

  • @snowmanplan
    @snowmanplan3 ай бұрын

    I followed this twice but I can't get it to work. As soon as I check the box for "Only Show Selected Variant Images", my thumbnails just turn into a squashed line. I don't know if it's possible to provide the code in full rather than copy-pasting bits here and there? (assuming everything else is unmodified).

  • @theprompted

    @theprompted

    3 ай бұрын

    Sorry you are having trouble with the code! I'll think about how we can make this easier for viewers to install.

  • @lindsaypmoore
    @lindsaypmooreАй бұрын

    I feel like I'm losing my mind. I have tried this 4 times. Thank goodness for the ability to duplicate a theme so as not to mess up the OG, because each time I try this, it still doesn't work. I have the 14.0.0 version, so I'm guessing it's that.

  • @theprompted

    @theprompted

    Ай бұрын

    I'm sorry it hasn't been working out. Other commenters have mentioned having issues with v14, so we'll take a look at that and create a new version if necessary.

  • @theprompted

    @theprompted

    16 күн бұрын

    v14 fix was just released, you can check it out here: kzread.info/dash/bejne/m2h4sq2DXd2wl7w.html

  • @gr_tarik1410
    @gr_tarik14103 ай бұрын

    Hey i have a question my whole store got an error i did everything correct but know if i change like from red to white i won't even change a picture nothing works it just shows one picture

  • @theprompted

    @theprompted

    3 ай бұрын

    Sorry that you're running into trouble. if it works on initial load but doesn't work when you click a button, then this indicates an issue with the javascript installation steps. Double check that you added the data parameters to the and elements. For example, you'll need the data-variant-grouping parameters in the element in order for the js to function properly.

  • @hydrastudio.
    @hydrastudio.2 ай бұрын

    Hello, does it work for any theme included paid theme ?

  • @theprompted

    @theprompted

    2 ай бұрын

    This customization was designed for the free Shopify themes. Paid themes often have a different structure, so this customization will likely require additional development to adapt it to a paid theme.

  • @charhayah
    @charhayah29 күн бұрын

    Hello! This is exactly what I was looking for. Does this work for version 15 too?

  • @theprompted

    @theprompted

    29 күн бұрын

    Unfortunately it won't, but we're working on an updated version that's v15 compatible!

  • @Atishay-u2e

    @Atishay-u2e

    17 күн бұрын

    @@theprompted it is working, Just not updating the product galary. if we refresh it is working

  • @theprompted

    @theprompted

    16 күн бұрын

    And changing variant options. But a new version is coming out soon to fix all of these issues.

  • @Atishay-u2e

    @Atishay-u2e

    16 күн бұрын

    @@theprompted i am glad to hear that. I hope it is really soon!

  • @theprompted

    @theprompted

    16 күн бұрын

    The v15 fix just came out! Check it out here: kzread.info/dash/bejne/m2h4sq2DXd2wl7w.html

  • @waqasghuman1798
    @waqasghuman1798Ай бұрын

    Does this tutorial woek with Dawn version 14 also?

  • @theprompted

    @theprompted

    Ай бұрын

    It will need to be modified a bit to adapt to Dawn v14. Will be working on an update!

  • @theprompted

    @theprompted

    16 күн бұрын

    Here's the fix for v14: kzread.info/dash/bejne/m2h4sq2DXd2wl7w.html

  • @machnumber8900
    @machnumber890011 күн бұрын

    I followed each step but I am still having an issue. I have v15 Dawn and followed your newer video of v15 too. Actually came here for meta grouping. When i select a different color variant, the featured picture DOES change but the thumbnails dont. Infact they change when i press refresh after changing the variant. Can you help please?

  • @theprompted

    @theprompted

    5 күн бұрын

    A few other viewers have mentioned this as well. We'll be looking into this more closely

  • @machnumber8900

    @machnumber8900

    5 күн бұрын

    @@theprompted Thanks

  • @wildatheart15
    @wildatheart15Ай бұрын

    what if my theme doesn't have a product-media.js file? how do I go about it then?

  • @theprompted

    @theprompted

    Ай бұрын

    This tutorial was designed for the free Shopify themes (ex: Dawn, Sense, Refresh, etc). Are you using a premium/paid/third-party theme?

  • @wildatheart15

    @wildatheart15

    Ай бұрын

    @@theprompted yes I am. How do I go about it then?

  • @theprompted

    @theprompted

    Ай бұрын

    The code structure of the free themes is different from the paid ones, so unfortunately a developer would have to custom build it for you. You can either look for apps that add this functionality or if you want us to help you with it you can hire us at theprompted.co/hire-us

  • @sukant.sharma
    @sukant.sharma2 ай бұрын

    but can we use two varriants? - color - fit (oversized & regular) So if I select blue and oversized it show images for that variant only?

  • @theprompted

    @theprompted

    2 ай бұрын

    Great question! I'll look into that.

  • @sukant.sharma

    @sukant.sharma

    2 ай бұрын

    @@theprompted I figured it out. Added two metafields. Product type: regular or oversized Alternate Product URL: on oversized product add regular product url, and for regular add oversized url. And then on product page i added two new button where if product is "regular", we should regular button as fill and add the alternate product url as "Oversized" outline button. But this open a new product page. Which works well for me. But if we can someone choose multiple variant and show multiple images for that specific variant it will be amazing.

  • @theprompted

    @theprompted

    2 ай бұрын

    Great! Sounds like you're linking 2 products together as variants. I actually have a video for that too, so if you were using your own solution, you might want to check out this as an option too: kzread.info/dash/bejne/e41mupajhMi3pqQ.html

  • @ronadoroon4945
    @ronadoroon49453 күн бұрын

    Is it a must to have the same number of images for all the variants?

  • @theprompted

    @theprompted

    3 күн бұрын

    No, that's not necessary. They just need to be grouped together using your chosen method (metafield, filename, alt text).

  • @iTsDaNsTaBrO
    @iTsDaNsTaBrOАй бұрын

    Why is it when using the metafields method, everything works fine until I click off the first variant (to another colour) and all the extra photos disappear? The primary photo changes to the desired colour variant but the other photos disappear and the primary is the only visible one? Help me pleaseeee

  • @theprompted

    @theprompted

    Ай бұрын

    Which theme are you using? This video was released before Dawn (and other free Shopify themes) were released, and there are commenters here that have reported it not working with v14. I'll be looking at fixing this for v14 soon.

  • @jonalsup5879

    @jonalsup5879

    Ай бұрын

    @@theprompted I am using Dawn 13 and the same exact thing happens. When i select a variant nothing else happens.

  • @theprompted

    @theprompted

    29 күн бұрын

    Variant changes are handled in the global.js file. I would double check your installation there to make sure there aren't any errors.

  • @justame7638
    @justame76383 ай бұрын

    Works great for products with variants. BUT product now with no variants/color with only the main picture shows. I need to get this fixed asap as store is live and active customers. UPDATE:::: again when only a product have only 1 color, the lightbox doesn't display an image. I cant even use y the duplicated backup theme as the code is allmessded up now from the duplication and my cusomt coding is not working. Pretty annoyed lol. Ive used 1st position and named color as first word in ALT TEXT option lat text in editor. Took me hours to do this and alt text all my products.

  • @theprompted

    @theprompted

    3 ай бұрын

    You're right - sorry about that. I had a fix for that but forgot to include it in the video. I've updated the code and it should now show all images if the product has no other variants. Another potential situation that you might have is a product that has variants but you still don't want the image filtering/grouping. For these situations, I've added additional instructions to create a metafield "Disable Image Grouping". For any products that you want the code to ignore, set this metafield to "True" , and it will show the images with the default behavior.

  • @justame7638

    @justame7638

    3 ай бұрын

    @@theprompted I fixed before you redidi code. You HAVE to have images for the size variant even if there's no color variant.

  • @theprompted

    @theprompted

    3 ай бұрын

    Yes, that's right. It's generalized because depending on what you sell, that might be exactly what you want.

  • @justame7638

    @justame7638

    3 ай бұрын

    @@theprompted UPDATE. just noticed that only the first image shows in light box no matter what product image I click for desktop. For mobile only the first image show in lightbox and no other images show for other images when clicked. Just white blank. What is the fix for this? Im not using metafields... I'm using the Alt Text method.

  • @theprompted

    @theprompted

    3 ай бұрын

    This is the media modal, so please double check: - product-media-modal.liquid was edited properly (especially remember to add the hide_image and variant_grouping_name parameters to the product-media.liquid render) - Make sure to add the classes and data-variant-grouping attribute to the element in product-media.liquid

  • @danishsuriya3985
    @danishsuriya3985Ай бұрын

    If I have 2500+ products with 1 product = 100 variants I need to do this to all 2500+ products?

  • @theprompted

    @theprompted

    Ай бұрын

    It depends on what your store’s needs are. If 1 product has 100 variants and you don’t need more, then you can just use the default Shopify variants because the limit is 100. In this scenario you don’t need to use this customization. Once you want to offer more variants than the default 100 then you have to look at different options. One option is this video and linking different products together. Another is to use the line item properties through a product options apps. And a final option is to look into seeing if you can get early developer access to the new 2000 variant limit that Shopify will be rolling out over time. Whichever option you choose, it will have to be used across every product that requires the additional variants.

  • @0_m884
    @0_m8842 ай бұрын

    Does this work on Craft?

  • @theprompted

    @theprompted

    2 ай бұрын

    It should work. Try it out and let me know how it goes! Just make sure to duplicate your theme before making any changes.

  • @0_m884

    @0_m884

    2 ай бұрын

    ​@@theprompted Gave it a shot. It didn't work the global.js has a different placement and I wasn't able to find where I was supposed to insert the code

  • @theprompted

    @theprompted

    2 ай бұрын

    Unfortunately this is probably due to the theme versions updating to v14. Will be looking into getting this fixed.

  • @RandomFacts962
    @RandomFacts962Ай бұрын

    not working

  • @theprompted

    @theprompted

    Ай бұрын

    Sorry to hear that. Which theme and version are you using?

  • @soll3sskill3r6
    @soll3sskill3r63 ай бұрын

    For the love of god where is the code. I'm tooo stupid for this. Its nowhere to copy paste

  • @theprompted

    @theprompted

    3 ай бұрын

    If you go to the link and scroll to the bottom, you will see triangle toggle buttons. Just click on them to show the code.

  • @ShoneTheGenije
    @ShoneTheGenije3 ай бұрын

    Am I the only one not managing to make it work? Anyone shared any experiance?

  • @theprompted

    @theprompted

    3 ай бұрын

    Works for me lol What problem are you running into?

  • @ShoneTheGenije

    @ShoneTheGenije

    3 ай бұрын

    @@theprompted not sure. Followed steps 3 times. Basically, it kind of works, as it filters images to the first Option Variant. But images are not clickable, don't change on variant change. So, really not sure where I got it wrong. Tried all methods, Meta filed, File Name, Alt Tag. So, no constructive advice from me this time.

  • @theprompted

    @theprompted

    3 ай бұрын

    If clicking doesn't work, it might have something to do with the javascript. There's a step that accidentally got missed in the video that were added to the instructions link: the element needs a few additional data parameters. Also, also double check that the classes and data parameters were added to the elements. These data parameters are necessary for the javascript to get the data to get clicking behavior to work properly.

Келесі