No video

How To Create Color Swatches for Product Variants in Shopify (Dawn Theme)

In this Shopify theme development tutorial, we're going to learn how to create color swatches for products/variants page using Metafields in Shopify. In this tutorial, we will be using the newest Shopify theme called Dawn and so if you're using Dawn in your Shopify store, then this video is for you!
If you are interested to learn more about Shopify theme development, I have put up a course that'll teach everything you need to know about Shopify theme development, including liquid objects, tags, and filters. Creating pages, snippets, sections, translations, etc.
So if you're interested, you can start here:
✅ Take my Shopify Theme Development Course:
weeklyhow.com/courses/shopify...
✅ Learn more Shopify Theme Development here:
• Shopify Theme Development
✅ Get your SHOPIFY DOMAIN here:
weeklyhow.com/go/hostinger-2021
#Shopify
#ColorSwatchesInShopify
#ShopifyThemeDevelopment
🔔 Subscribe now for more Shopify related content:
► kzread.info?sub...
Official Website:
► weeklyhow.com/
Follow us on our Social Media:
- Facebook ► / weeklyhow
- Twitter ► / howweekly
- Instagram ► / weeklyhow

Пікірлер: 79

  • @arcticbottles8844
    @arcticbottles88442 жыл бұрын

    Very useful video, exactly what I was looking for. Very easy to follow even if you don't have any specialized knowledge in Liquid. Thank you!

  • @commerize
    @commerize2 жыл бұрын

    OH WOW WHAT A PERFECT TUTORIAL!!!! - You are the best. Even got it to work within the prestige theme :)

  • @lexima6871
    @lexima68712 жыл бұрын

    Unfortunately, this does not work if you have a product with multiple variants. The indexes will show incorrectly and therefore select the wrong colors

  • @instudio4362

    @instudio4362

    Жыл бұрын

    kzread.info/dash/bejne/loekpJdsiMrTedI.html

  • @ninjagaskin
    @ninjagaskin2 жыл бұрын

    Very helpful, and well presented. thank you

  • @brunasfa4095
    @brunasfa4095 Жыл бұрын

    Thank you so much!! I was going crazy to fix that and I did it!! Perfect tutorial! I would like to change de button, make it perfect rounded... You could teach this too!!! 😁

  • @ecomstories
    @ecomstories2 жыл бұрын

    Thank you man! You just really helped me out!

  • @f0273
    @f0273 Жыл бұрын

    Thank you so much, amazing works

  • @Marcos-xv8zh
    @Marcos-xv8zh2 жыл бұрын

    Excellent job on this! Thank you! Is there a way for the customer to know exactly what color they are selecting in addition to just what color they see? Sometimes the colors can very similar and it's helpful for them to see the title of the color as well when it's selected. Is that possible in the Dawn template?

  • @umairtahir5700
    @umairtahir57002 жыл бұрын

    Thanks, This is very helpful :)

  • @c0rnell_167
    @c0rnell_16711 ай бұрын

    Thanks for a perfect tutorial! Is there a way to make them rounder and make them to cross between procuts? Examples: 4 colors to select and if you select "blue" you will be redericted to the acutally product thats blue?

  • @CholavendhanSelvaraj
    @CholavendhanSelvaraj2 жыл бұрын

    Gr8 tutorial... I am working on shopify ecommerce ... Thank you..

  • @WeeklyHow
    @WeeklyHow2 жыл бұрын

    Learn more Shopify Theme Development here: ✅ Shopify Liquid Programming Course (Use COUPON CODE: 6XZXDGG2): weeklyhow.com/courses/learn-shopify-liquid-programming-in-1-hour/ ✅ Shopify Theme Development w/ TailwindCSS & Shopify CLI weeklyhow.com/courses/shopify-theme-development-tailwindcss/ ✅ Shopify Liquid Programming Course: www.udemy.com/course/learn-shopify-liquid-programming/?couponCode=9BAEB3A223BB6BA4D37E ✅ Shopify Theme Development w/ TailwindCSS & Shopify CLI www.udemy.com/course/shopify-theme-development-tailwindcss/?couponCode=AUGMENTEDREALITY

  • @CuBeAreaFUN
    @CuBeAreaFUN2 жыл бұрын

    THANK YOU!!!!!!! 👍 Useful!!!!!!

  • @Glifecases_
    @Glifecases_2 жыл бұрын

    Thx, Works in sense

  • @SkolVikings22
    @SkolVikings22 Жыл бұрын

    Thumbs up! Very cool tutorial. But how do we make the swatches a perfect circle? (It's currently an oval and doesn't look as clean.)

  • @degenjmartin9368
    @degenjmartin93682 жыл бұрын

    works!

  • @shamuclc
    @shamuclc2 жыл бұрын

    This is great, thank you very much for making this tutorial! Is there a easy way to make it show an image instead of a solid color? Edit: Ok so I fiigured it out.. instead of creating a color metafield, create a text one, this will hold the url of the image you want to use for the button background. On the product page where you enter the metafield data, paste the url of the image you want to use in the available text area. Next, in the code instead of style = background color, it needs to be background image and then wrap the metafield info in the url tag like this: style="background-image: url({{ product.variants[forloop.index0].metafields.color.value }}) this should now show the image as the backgound of the button. Next you will need to style the button, it will shrink once the text has been removed.

  • @kypac99

    @kypac99

    2 жыл бұрын

    THANKS MAN!!!!!!!!!!!!!1

  • @JeremyGriffingplus
    @JeremyGriffingplus2 жыл бұрын

    Genius!

  • @joeli89
    @joeli892 жыл бұрын

    Hey guys, does anyone know how to give the variant selected an active state? As it would be great to indicate to the user which one is currently selected. Thank you!

  • @felixehold6979
    @felixehold69792 жыл бұрын

    Hey, do you maybe know, how to show different band color variations for different watches on the product page? (Variation1: Watch; Variation2: Band Colour) I would be so grateful! 🌟

  • @rimebaalaoui1494
    @rimebaalaoui14942 жыл бұрын

    Hi very useful thanks, but taken you select a color, the button is not “highlighted”, basically you don’t know what’s selected currently, how to solve this please?

  • @CholavendhanSelvaraj
    @CholavendhanSelvaraj2 жыл бұрын

    Can you make video of how to display/ enable breadcrumbs .?

  • @monikastyleloveshome4657
    @monikastyleloveshome46579 ай бұрын

    It worked for me! Thanks a lot!

  • @WeeklyHow

    @WeeklyHow

    9 ай бұрын

    Happy it worked on your end! 🙏

  • @gymnast3242
    @gymnast32422 жыл бұрын

    tried this but didn't work for me. wondering if my size 1 and size 2 varients mess up the colour setting as some colours didn't show up for me despite being picked correctly in the product page

  • @tranthaongc3181
    @tranthaongc31812 жыл бұрын

    Hi, what if I have a lot of variable products and don't want to recreate the color? Is there any faster way? Thanks

  • @tesskelly5790
    @tesskelly5790 Жыл бұрын

    Hello. Thankyou for this tutorial. This doesn't seem to work for me if my second variant has multiple options EG: 4 sizes. I am using Dawn theme version 7.0.1.

  • @nejcdovzankukic8408
    @nejcdovzankukic84082 жыл бұрын

    Hi! What about when you have multiple products? Because it seems like this code sticks to just one product and it doest apply on others. Thanks!

  • @NetanelColish
    @NetanelColish2 жыл бұрын

    tysm

  • @wasiqiqbal9822
    @wasiqiqbal98222 жыл бұрын

    Hi! Did you have any ideas how Shopify app proxy work with custom php. Did it work with custom Shopify App ??

  • @user-nx5mu2ke7q
    @user-nx5mu2ke7q Жыл бұрын

    Do you have a tutorial for the Symmetry Shopify theme?

  • @leonelfranciscogalvanlobato
    @leonelfranciscogalvanlobato4 ай бұрын

    Gran video, 👍

  • @byteconcepts8866
    @byteconcepts88662 жыл бұрын

    Hello , hope you are doing well, I have thise problem , where i want to customize the collection such that when the customer clicks the blue then red color, it overrides the blue color then filters only the red color

  • @numannusrullah4838
    @numannusrullah48382 жыл бұрын

    Sir i have a question please help me. i installed impulse theme on my store but problem is that in collection filters when click on one color filter it shows related products according to color, when i select second color it does not deselect the previous one and also select the another color and now shows the result of two colors products. but i want select only one at one time and other is deselect automatics. give me solution

  • @INDRACOMM32
    @INDRACOMM32 Жыл бұрын

    Good morning, Very good video. My question: on the same product the customer must choose the color of the bag (I managed to put the samples) but the second variant is the handle of the bag or he can also choose his color (the same as the bag) and the I can't submit the color samples. Am I missing some code? thank you for your reply

  • @danielnatale387
    @danielnatale387 Жыл бұрын

    Heyy, this worked for me, but I want it to update the background color on hover and select, then change back to white when not selected. any tips on how to do that?

  • @premmali8206
    @premmali82062 жыл бұрын

    please also give link to any repo where you can save all the code that you wrote so it can save time to write everything from screen.

  • @user-vi6pq6dh8w
    @user-vi6pq6dh8w Жыл бұрын

    I cannot see variant_picker when control finding on 5 minutes 30 seconds into the video. If this does not appear, what do you suggest?

  • @GaboGabuya
    @GaboGabuya8 ай бұрын

    How about instead of color, we you sa variant's image? Is that possible?

  • @tomekgames2352
    @tomekgames235210 ай бұрын

    do you know what about refresh theme? thats very popular theme

  • @maxbil9577
    @maxbil95772 жыл бұрын

    Hi, thanks for the video, but when you change the position of the option, it stops working

  • @davifonseca8203
    @davifonseca82032 жыл бұрын

    Do I need to do it to every product, one by one ?

  • @jacon1424
    @jacon14242 жыл бұрын

    How about in Prestige? Can you show how is this done in prestige?

  • @umairtahir5700
    @umairtahir57002 жыл бұрын

    can you make a video on "how to create a products slider on the product page (Dawn Theme) Thanks

  • @WeeklyHow

    @WeeklyHow

    2 жыл бұрын

    Thank you Umair, I'll keep this in mind!

  • @yonatanron8533
    @yonatanron85332 жыл бұрын

    I have more than 100 products, There is any easy way to do it bulk?

  • @dattruong6187
    @dattruong61872 жыл бұрын

    Do you know how to display dual color?

  • @monic_va
    @monic_va2 жыл бұрын

    How to disable Auto Select for variant?

  • @wasiqiqbal9822
    @wasiqiqbal98222 жыл бұрын

    Hi! I have just one request plz make a vedio on create something (POST) with Rest Admin Api's with Vanilla PHP and one Graphql mutation example. Or just share one example of Shopify Call Method type Post function. Thank You

  • @WeeklyHow

    @WeeklyHow

    2 жыл бұрын

    I'll take a note of that. Thanks

  • @vidafuku
    @vidafuku2 жыл бұрын

    Great tutorial ! I want to use dawn but it has 2 issues. Unfortunately, Dawn's product page is confusing when you have multiple colors and images; when you click a color option, the image order changes. they should only display the selected options images and toggle the rest. Also, Dawn doesn't show the product's color options in the collection page; I really think they should add an option to turn this feature on.

  • @adelinebettityy2720

    @adelinebettityy2720

    Жыл бұрын

    real color options make me so confused. Can't set a default image.

  • @instudio4362

    @instudio4362

    Жыл бұрын

    kzread.info/dash/bejne/loekpJdsiMrTedI.html

  • @MKitson
    @MKitson Жыл бұрын

    In the current version of dawn it looks like you have to use the product variant snippet, not the main product page under sections. Still, the code in the product variant snippet does not look quite the same as what you have here (although it is similar) and as I result I could not get this to work - an updated vid would be massivley appreciated from me

  • @verion5588

    @verion5588

    10 ай бұрын

    There's the first file you found which you found with the name "product-variant-picker.liquid", but that one only combines everything for the variant picker together. There's another subfile which is referenced in product-variant-picker.liquid named product-variant-options.liquid. In there you'll find the liquid/html that actually handels the radio buttons of the variant picker. Hope this helps :)

  • @jcnation5393
    @jcnation5393 Жыл бұрын

    Not working in Dawn 9.0

  • @Iamprashantsirohi
    @Iamprashantsirohi2 жыл бұрын

    Hey, can you make a video on how to add just image section and just like column and we can put a link too. When someone clicks on the image that should go the image's link which we have set through images. I have seen it somewhere, now not able to find it.

  • @dawnholrath2928

    @dawnholrath2928

    8 ай бұрын

    kzread.info/dash/bejne/qmeuo8Oxqtzbl9Y.html is this what you're looking for?

  • @dawnholrath2928

    @dawnholrath2928

    8 ай бұрын

    Or if you have this working, you could try: To add images, instead of creating a color metafield, create a text one, this will hold the url of the image you want to use for the button background. On the product page where you enter the metafield data, paste the url of the image you want to use in the available text area. Next, in the code instead of style = background color, it needs to be background image and then wrap the metafield info in the url tag like this: style="background-image: url({{ product.variants[forloop.index0].metafields.color.value }}) this should now show the image as the backgound of the button. Next you will need to style the button, it will shrink once the text has been removed.

  • @Dracu666
    @Dracu66611 ай бұрын

    🌟👍

  • @numannusrullah4838
    @numannusrullah48382 жыл бұрын

    i want to make swatches but not on colors . i want to show some relevant product on One Product just like swatch . when user click on swatch product navigate to that specific product . can you help me

  • @thefoamingbrain2469

    @thefoamingbrain2469

    2 жыл бұрын

    same thing but instead use the url or image

  • @juanlegua8475
    @juanlegua84752 жыл бұрын

    Hi, how would I do if I want to add swatches images or textures instead of colors? help pleasev

  • @shamuclc

    @shamuclc

    2 жыл бұрын

    To add images, instead of creating a color metafield, create a text one, this will hold the url of the image you want to use for the button background. On the product page where you enter the metafield data, paste the url of the image you want to use in the available text area. Next, in the code instead of style = background color, it needs to be background image and then wrap the metafield info in the url tag like this: style="background-image: url({{ product.variants[forloop.index0].metafields.color.value }}) this should now show the image as the backgound of the button. Next you will need to style the button, it will shrink once the text has been removed.

  • @mceybrown
    @mceybrown2 жыл бұрын

    i was following till i got to a t junction then i couldn't find my way.

  • @wasiqiqbal9822
    @wasiqiqbal98222 жыл бұрын

    👌👍

  • @WeeklyHow

    @WeeklyHow

    2 жыл бұрын

    🙌

  • @Zeioth
    @Zeioth2 жыл бұрын

    Cool tutorial, but if you add any other variant, is gonna color it too. So this cannot be used with products with more than one variant.

  • @instudio4362

    @instudio4362

    Жыл бұрын

    kzread.info/dash/bejne/loekpJdsiMrTedI.html

  • @aecho5955

    @aecho5955

    5 ай бұрын

    {% if option.name == 'Color' %} and so and so

  • @vm6445
    @vm64452 жыл бұрын

    r u a filipino?

  • @Gabelifts17
    @Gabelifts17 Жыл бұрын

    vilken shuno bre