How To Add Color Swatches To Your Shopify Product Page

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024

Комментарии • 87

  • @Bitbranding
    @Bitbranding  2 года назад +3

    Want to know ways to customize your shopify store using the DAWN theme let us know in the comments.

    • @bridalhive1126
      @bridalhive1126 2 года назад

      I would like to change my watches to image of the actual product color

  • @Levis_Grey
    @Levis_Grey 2 года назад +5

    Does not work on my Dawn Theme. I guess the code is right, cause I checked it many times, but it doesn't change anything on my product form input.
    Frustrating :/

    • @Bella-ll7ni
      @Bella-ll7ni 2 года назад +2

      not working for me too

    • @HussainKovic
      @HussainKovic Год назад

      @@Bella-ll7ni also not working for me

  • @momocotton3049
    @momocotton3049 11 месяцев назад +1

    Hi, i was trying to update the code as mentioned in the tutorial, but can find the code in my dawn theme. I am currently using version 11.0 of the theme. Do you know if your recommendations are applicable for the updated theme?

  • @catchcutness15
    @catchcutness15 10 месяцев назад +1

    Hi, I have a new shopify store. I'm not sure if coding is updated when versions of Dawn are updated. I'm currently on Dawn version 11.0.0 and I can't find
    {{ value }}
    anywhere in my Main-Product.Liquid. Can you help?

    • @hoangduy3602
      @hoangduy3602 7 месяцев назад

      me too!
      Do you fixed it ?

  • @joshjpierce
    @joshjpierce 2 года назад +2

    Not seeing this code to be replaced, currently using Dawn 5.0 theme.

  • @martinm8388
    @martinm8388 Год назад

    thanks a lot dude, first tutoriel that really works.

  • @kingkuann
    @kingkuann 2 года назад +1

    hey bitbranding, i followed all the steps but its still not working. can you help me in any way?

  • @fatherleo4603
    @fatherleo4603 2 года назад +4

    Is there a faster way to do this if you have you have over 200 different types of clothing?

    • @scottydigital
      @scottydigital 2 года назад +2

      Thanks, @Father Leo! Same question. Seems like there has to be a faster way to do this

  • @dakkar4962
    @dakkar4962 Год назад +1

    Unfortunately, this code doesn't work in Dawn 9.0.0

  • @katyalakshmi5293
    @katyalakshmi5293 2 года назад +4

    Thank you for this! Can you tell me how we can get the color name to show up above the color swatch?

  • @nataliekerr3948
    @nataliekerr3948 2 года назад +2

    Thank you! Are you able to share or advise how to have the colour name appear with the colour at all? I am unable to find anything :(

    • @sirlevinkman7199
      @sirlevinkman7199 2 года назад +1

      +1 (it looks good, but I also need the color code to be visible)

  • @kelleycarpenter-conijn2730
    @kelleycarpenter-conijn2730 4 месяца назад

    Using Trade Theme. No option.position to search. Does this mean I can not make this edit with this theme?

  • @barak499
    @barak499 Год назад

    Great video and it works!
    Just one problem
    I have 3 products on the site. In the first product I chose a black color and as soon as I choose additional colors for the rest of the products it shows me on the product page only the first color (black) I chose why doesn't it let me choose other colors for the other products?
    and by the way, I deleted all the colors to do it again & it shows me only color, why?

  • @lamont.collective
    @lamont.collective Год назад

    Hi, thanks for the video. This didnt work for me - any suggestions?

  • @sophieho8364
    @sophieho8364 2 года назад +2

    I can't fine code
    {{ value }}
    on dawn theme 6.0.2.

  • @Elementalsight
    @Elementalsight Год назад +1

    This is super helpful, thanks!

  • @brazzyuca
    @brazzyuca 2 года назад +2

    would the code work for any other theme other than Dawn?

  • @adminmaddesign2831
    @adminmaddesign2831 Год назад

    Great tutorial. Does it work for craft theme? I cannot find the lines to change. Can you help me please? Thanks

  • @agathaandrade4975
    @agathaandrade4975 Год назад

    Thank you for the video! Very informative. I was able to edit the code without any issues. And it worked.
    However, I have an observation/question: In my case, I have 6 colors and 5 different sizes for a lot of different designs/products.
    It is very difficult to paste the link "image" for every single product/color & size variation. Is there a way to make it more streamlined? Am I missing something here?
    Thanks again for taking the time to make this video.
    Update:
    I am new to customizing my Shopify store. I noticed a new update for the Dawn theme. With the update, any code changes will not be carried on, which means that all the work I did will have to be done again and again with future updates, which is really not doable, considering the time and the complexities involved. What is your take on using apps to do such customizations?

    • @Blopez_
      @Blopez_ Год назад

      I think theres a app that allows u to push code I would do that or backup code with notepad

  • @brinleywilliams6304
    @brinleywilliams6304 2 года назад

    Great Video - thx! Would it still work if you had another Varaible like Size as well as Color on the Product page?

  • @Joker-n1t
    @Joker-n1t Год назад

    Bro Main Product Liquid Is Not Showing In My theme edit code

  • @jannattahir4092
    @jannattahir4092 Год назад

    HI, its working fine, but how can also appear the name of selected colors ?

  • @brandlesspk
    @brandlesspk 2 года назад +2

    No label code found in main liquid file :(

  • @AIProphets
    @AIProphets Год назад

    Does this only work on Dawn? I use Refresh but it doesn't work

  • @barak499
    @barak499 Год назад

    great video!
    how & where Can I add the HEX CODE on the theme?

  • @karlburton1679
    @karlburton1679 2 года назад

    Thanks guys, another great video!

  • @SamuraiSpooky
    @SamuraiSpooky Год назад +1

    There is any way to send to a new url product when you clic on a different color ?

    • @Bitbranding
      @Bitbranding  Год назад

      We are working on a video for this -C

  • @Deb-dp1qc
    @Deb-dp1qc Год назад

    Hi Christian, thanks for your helpful videos. But as I'm using Dawn ver. 11.0.0, I didn't find the portion of the code you mentioned, within the main-product.liquid. Could you please give a solution How can I do it at my store. Awaiting your reply.

    • @AkshyaLWW
      @AkshyaLWW Год назад

      hi Christian.... I am also facing same problem..please help

    • @vidur7741
      @vidur7741 Год назад +1

      @@AkshyaLWW The file you need to look for in the new Dawn theme is "product-variant-options.liquid" That code has moved there now.

  • @HridoyAhmed-kj9et
    @HridoyAhmed-kj9et Год назад

    Is it work for any theme?

  • @pathakharsh78
    @pathakharsh78 2 года назад

    How to add custom colors to the Prestige Shopify theme? I want to add different color shades of one color with the same name. Like Blue color shades with a same Blue color name for all the color variations.

  • @HridoyAhmed-kj9et
    @HridoyAhmed-kj9et Год назад

    I have another theme, so how can i use it?

  • @DiploWoah
    @DiploWoah 2 года назад

    Would you be able make it change to another product url when clicking color? So you have for example four different product pages which are linked?

    • @jasonkelly379
      @jasonkelly379 2 года назад

      did you find out how to do this? I am looking to do the same

    • @simonsevelsted3735
      @simonsevelsted3735 2 года назад

      @@jasonkelly379 Im also looking to do the same!

    • @leuenberger7629
      @leuenberger7629 Год назад

      @@simonsevelsted3735 I mean 4 Months has passed so has anyone found the solutions

  • @huytrancam6179
    @huytrancam6179 Год назад

    This is a good solution but for the store that has huge catalogue, it will be a nightmare to update just a specific color for the products unfortunately :(((

  • @terramerana
    @terramerana 2 года назад

    Hi! Very useful and easy video but it doesn't seem to be working when there's another variant such as size. Could you please help?
    Thanks

    • @TheMonsieurOo
      @TheMonsieurOo Год назад

      hi. i'm facing the same challenge did you find a solution to it ?

  • @mvanbreda1
    @mvanbreda1 2 года назад

    Is there a way to do bulk color metafieds as I have loads of T-Shirts with different variants size and color and will take forever to do it one by one?

  • @hermes.trismegistus7259
    @hermes.trismegistus7259 Год назад

    There is no "main product liquid" in my code. That is how it shows on your theme.

  • @1988Jac
    @1988Jac Год назад

    Hi, will this work on the Shopify Symmetry Theme?

    • @Bitbranding
      @Bitbranding  Год назад

      More than likely not. Every theme has different code.

  • @preetidhanik1750
    @preetidhanik1750 Год назад

    Thank you for this video it is very helpful for all. Can you tell me How we do same thing for collection page ??

  • @gracebreshears5075
    @gracebreshears5075 2 года назад

    Does this mess with the size variant buttons?

  • @tourofthanh
    @tourofthanh 2 года назад +1

    great video, super helpful. Where can I find the code?

    • @Bitbranding
      @Bitbranding  2 года назад +1

      Here it is! docs.google.com/document/d/1rhxZFV37OZXEjPKVky4SH1c7CWthYEzwfvrA-RfimLw/edit?usp=sharing

    • @tourofthanh
      @tourofthanh 2 года назад

      thank you so much bro. Been trying to figure this out for days and you are a life saver. Any way to have the text appear above the colors when hovering over with mouse

  • @seamslegitdesigns
    @seamslegitdesigns 2 года назад

    I followed this tutorial and the colors show only for black or white . I'm using the dawn theme.

  • @WebSensePro
    @WebSensePro 2 года назад

    Great video

  • @annasinn6918
    @annasinn6918 Год назад

    What about I missing main-product.liquid in theme code files

  • @paulotorres9511
    @paulotorres9511 2 года назад

    Excelente video, estuve buscando COMO hacer esto por mucho tiempo, gracias!!!!!!!!

  • @varalakshmicreations4167
    @varalakshmicreations4167 2 года назад

    Sir,
    we are not able to find the code for this process.

    • @Bitbranding
      @Bitbranding  2 года назад

      docs.google.com/document/d/1rhxZFV37OZXEjPKVky4SH1c7CWthYEzwfvrA-RfimLw/edit?usp=sharing

    • @varalakshmicreations4167
      @varalakshmicreations4167 2 года назад

      @@Bitbranding Thank You Sir

  • @SteveMiguel
    @SteveMiguel Год назад

    super helpful!

  • @zeesidesigngarden
    @zeesidesigngarden 2 года назад

    can the ability to add swatches be done without coding? the apps don't seem to work so well

  • @seamslegitdesigns
    @seamslegitdesigns 2 года назад

    Thank you 😊

  • @ACHA-TEACHER
    @ACHA-TEACHER 2 года назад

    Where is the code Sir?

    • @Bitbranding
      @Bitbranding  2 года назад

      Sorry about that. Here you go: docs.google.com/document/d/1rhxZFV37OZXEjPKVky4SH1c7CWthYEzwfvrA-RfimLw/edit?usp=sharing

  • @meriammuller
    @meriammuller Год назад

    thanks a lot "BitBranding"

  • @NesliNecipoğlu
    @NesliNecipoğlu 3 месяца назад

    Here is the code for Dawn theme - product-variant-optiions.liquid . It works only one option which is color. What about if you add size ? It doesn't work.
    {% comment %}
    Renders product variant options
    Accepts:
    - product: {Object} product object.
    - option: {Object} current product_option object.
    - block: {Object} block object.
    - picker_type: {String} type of picker to dispay
    Usage:
    {% render 'product-variant-options',
    product: product,
    option: option,
    block: block
    picker_type: picker_type
    %}
    {% endcomment %}
    {%- liquid
    assign variants_available_arr = product.variants | map: 'available'
    assign variants_option1_arr = product.variants | map: 'option1'
    assign variants_option2_arr = product.variants | map: 'option2'
    assign variants_option3_arr = product.variants | map: 'option3'
    assign product_form_id = 'product-form-' | append: section.id
    -%}
    {%- for value in option.values -%}
    {%- liquid
    assign option_disabled = true
    for option1_name in variants_option1_arr
    case option.position
    when 1
    if variants_option1_arr[forloop.index0] == value and variants_available_arr[forloop.index0]
    assign option_disabled = false
    endif
    when 2
    if option1_name == product.selected_or_first_available_variant.option1 and variants_option2_arr[forloop.index0] == value and variants_available_arr[forloop.index0]
    assign option_disabled = false
    endif
    when 3
    if option1_name == product.selected_or_first_available_variant.option1 and variants_option2_arr[forloop.index0] == product.selected_or_first_available_variant.option2 and variants_option3_arr[forloop.index0] == value and variants_available_arr[forloop.index0]
    assign option_disabled = false
    endif
    endcase
    endfor
    assign swatch_focal_point = null
    if value.swatch.image
    assign image_url = value.swatch.image | image_url: width: 50
    assign swatch_value = 'url(' | append: image_url | append: ')'
    assign swatch_focal_point = value.swatch.image.presentation.focal_point
    elsif value.swatch.color
    assign swatch_value = 'rgb(' | append: value.swatch.color.rgb | append: ')'
    else
    assign swatch_value = null
    endif
    -%}
    {%- capture input_id -%}
    {{ section.id }}-{{ option.position }}-{{ forloop.index0 -}}
    {%- endcapture -%}
    {%- capture label_unavailable -%}

    {{- 'products.product.variant_sold_out_or_unavailable' | t -}}

    {%- endcapture -%}
    {%- if picker_type == 'swatch' -%}
    {% liquid
    assign checked = false
    if option.selected_value == value
    assign checked = true
    endif
    %}
    {%- capture help_text -%}
    {{ value | escape }}
    {{ label_unavailable }}
    {%- endcapture -%}
    {%
    render 'swatch-input',
    id: input_id,
    name: option.name,
    value: value | escape,
    swatch: value.swatch,
    product_form_id: product_form_id,
    checked: checked,
    visually_disabled: option_disabled,
    shape: block.settings.swatch_shape,
    help_text: help_text
    %}
    {%- elsif picker_type == 'button' -%}


    {% assign variant_needed = null %}
    {% for variant in product.variants %}
    {% if variant.options contains value %}
    {% assign variant_needed = variant %}
    {% endif %}
    {% endfor %}
    {% if variant_needed.metafields.color.swatch and option.name == 'Color' %}

     

    {% elsif variant_needed.metafields.image.swatch and option.name == 'Color' %}

     

    {% else %}

    {{ value }}

    {% endif %}
    {%- elsif picker_type == 'dropdown' or picker_type == 'swatch_dropdown' -%}

    {% if option_disabled -%}
    {{- 'products.product.value_unavailable' | t: option_value: value -}}
    {%- else -%}
    {{- value -}}
    {%- endif %}

    {%- endif -%}
    {%- endfor -%}

  • @TV-yo9of
    @TV-yo9of Год назад

    you can't use this if there are size variants...most clothing have atleast 3 different sizes. Useless video

  • @WankinLegend
    @WankinLegend Год назад

    Why is it my open.position says not found when i look it up?