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

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 79

  • @WeeklyHow
    @WeeklyHow  2 роки тому

    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

  • @commerize
    @commerize 2 роки тому +1

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

  • @CholavendhanSelvaraj
    @CholavendhanSelvaraj 2 роки тому

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

  • @monikastyleloveshome4657
    @monikastyleloveshome4657 Рік тому

    It worked for me! Thanks a lot!

    • @WeeklyHow
      @WeeklyHow  Рік тому

      Happy it worked on your end! 🙏

  • @arcticbottles8844
    @arcticbottles8844 3 роки тому

    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!

  • @CuBeAreaFUN
    @CuBeAreaFUN 2 роки тому

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

  • @lexima6871
    @lexima6871 3 роки тому +15

    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 Рік тому

      ua-cam.com/video/dSpB53XgmIo/v-deo.html

  • @ecomstories
    @ecomstories 3 роки тому

    Thank you man! You just really helped me out!

  • @f0273
    @f0273 2 роки тому

    Thank you so much, amazing works

  • @rimebaalaoui1494
    @rimebaalaoui1494 3 роки тому +2

    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
    @CholavendhanSelvaraj 2 роки тому

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

  • @ninjagaskin
    @ninjagaskin 3 роки тому

    Very helpful, and well presented. thank you

  • @c0rnellxd
    @c0rnellxd Рік тому +1

    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?

  • @brunasfa4095
    @brunasfa4095 2 роки тому

    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!!! 😁

  • @joeli89
    @joeli89 2 роки тому +5

    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!

  • @Glifecases_
    @Glifecases_ 2 роки тому

    Thx, Works in sense

  • @shamuclc
    @shamuclc 3 роки тому +11

    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 3 роки тому +1

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

  • @leonelfranciscogalvanlobato
    @leonelfranciscogalvanlobato 10 місяців тому

    Gran video, 👍

  • @gymnast3242
    @gymnast3242 3 роки тому +3

    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

  • @KelsieWagner-c3z
    @KelsieWagner-c3z Рік тому

    Do you have a tutorial for the Symmetry Shopify theme?

  • @Marcos-xv8zh
    @Marcos-xv8zh 2 роки тому +2

    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?

  • @GaboGabuya
    @GaboGabuya Рік тому

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

  • @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?

  • @jcnation5393
    @jcnation5393 Рік тому +1

    Not working in Dawn 9.0

  • @tomekgames2352
    @tomekgames2352 Рік тому

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

  • @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.

  • @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

  • @user-vi6pq6dh8w
    @user-vi6pq6dh8w 2 роки тому

    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?

  • @umairtahir5700
    @umairtahir5700 3 роки тому

    Thanks, This is very helpful :)

  • @maxbil9577
    @maxbil9577 2 роки тому

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

  • @JeremyGriffingplus
    @JeremyGriffingplus 2 роки тому

    Genius!

  • @MKitson
    @MKitson Рік тому +1

    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 Рік тому +1

      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 :)

  • @umairtahir5700
    @umairtahir5700 3 роки тому +1

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

    • @WeeklyHow
      @WeeklyHow  3 роки тому +1

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

  • @SkolVikings22
    @SkolVikings22 2 роки тому

    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.)

  • @premmali8206
    @premmali8206 3 роки тому

    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.

  • @byteconcepts8866
    @byteconcepts8866 3 роки тому

    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

  • @davifonseca8203
    @davifonseca8203 3 роки тому

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

  • @jacon1424
    @jacon1424 3 роки тому

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

  • @nejcdovzankukic8408
    @nejcdovzankukic8408 3 роки тому

    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
    @NetanelColish 2 роки тому +1

    tysm

  • @dattruong6187
    @dattruong6187 2 роки тому

    Do you know how to display dual color?

  • @yonatanron8533
    @yonatanron8533 2 роки тому

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

  • @wasiqiqbal9822
    @wasiqiqbal9822 3 роки тому

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

  • @numannusrullah4838
    @numannusrullah4838 3 роки тому

    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

  • @felixehold6979
    @felixehold6979 3 роки тому

    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! 🌟

  • @monic_va
    @monic_va 3 роки тому

    How to disable Auto Select for variant?

  • @tranthaongc3181
    @tranthaongc3181 3 роки тому

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

  • @Iamprashantsirohi
    @Iamprashantsirohi 2 роки тому

    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 Рік тому

      ua-cam.com/video/x3zAaxzyugs/v-deo.html is this what you're looking for?

    • @dawnholrath2928
      @dawnholrath2928 Рік тому +1

      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.

  • @vidafuku
    @vidafuku 3 роки тому

    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 2 роки тому

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

    • @instudio4362
      @instudio4362 Рік тому

      ua-cam.com/video/dSpB53XgmIo/v-deo.html

  • @numannusrullah4838
    @numannusrullah4838 3 роки тому

    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

  • @mysanitybliss
    @mysanitybliss 3 роки тому

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

  • @juanlegua8475
    @juanlegua8475 3 роки тому

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

    • @shamuclc
      @shamuclc 3 роки тому

      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.

  • @Zeioth
    @Zeioth 2 роки тому +1

    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 Рік тому

      ua-cam.com/video/dSpB53XgmIo/v-deo.html

    • @aecho5955
      @aecho5955 11 місяців тому

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

  • @wasiqiqbal9822
    @wasiqiqbal9822 3 роки тому

    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  3 роки тому +1

      I'll take a note of that. Thanks

  • @degenjmartin9368
    @degenjmartin9368 3 роки тому

    works!

  • @Dracu666
    @Dracu666 Рік тому

    🌟👍

  • @wasiqiqbal9822
    @wasiqiqbal9822 3 роки тому

    👌👍

  • @vm6445
    @vm6445 3 роки тому

    r u a filipino?

  • @Gabee_dev
    @Gabee_dev 2 роки тому

    vilken shuno bre