Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Dawn show variant name when you switching

Solved

Dawn show variant name when you switching

Ailyte
Excursionist
14 0 2

Hi,

 

Maybe someone can help me with variants, I using the Dawn theme and when I switch the example colour, I wanna where below the writes colour, shows the colour name, is it possible to do it?

Also when you change colour it also changes.

 

Thanks

Accepted Solution (1)
webwondersco
Shopify Partner
1176 169 172

This is an accepted solution.

@Ailyte , why don't you try the variant as shown in the attached screenshot? I have created separate variants for color and style.

 

webwondersco_0-1687417629375.png

 

It'll display like the below screenshot on the front end side.

 

webwondersco_1-1687417681421.png

 

Does this works for you or do you need to go with the script option?

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram

View solution in original post

Replies 18 (18)

miguel_liquify
Shopify Partner
176 18 16

Can you provide the store URL?

★★★ Need help setting up your Shopify store? Hire me here: https://liquify.design ★★★

webwondersco
Shopify Partner
1176 169 172

@Ailyte , Could you please share the URL of the store? and also explain in detail what you actually want to do with the color variants.

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

@webwondersco 

You can check: dinhouse.co.uk

I have set when you are going on the product with colour variant, you above of colour swatch see "Colour: name"  but if I add style, I add better URL you can check when swapping style it's showing colour: 

https://dinhouse.co.uk/products/large-white-gloss-sideboard-with-leds?variant=45421003571508

Maybe is some way how I can set it colour shows colour and when show style it writes Style: name.

 

Thanks

webwondersco
Shopify Partner
1176 169 172

@Ailyte , currently I can see it's shows the color when you select any of the variants. at the time of beginning its shows the style.

webwondersco_0-1687370487628.png

 

 

So, do you want to implement its show style and color based on variant selection? Correct me If I am wrong.

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

@webwondersco 

Yes, you are correct I show an example of how  I want to be:

If I set color:

Color: "color name"

If I set style:

Style: "style name"

and etc..

Screenshot 2023-06-21 210543.png

Here is mine variants.

 

Thanks

webwondersco
Shopify Partner
1176 169 172

@Ailyte , Did you add diiferent variants there?

 

like for 1 variant list for color and a second variant list for style.

 

so if you add 2 values for color and 2 values for style then it'll display 4 values at front end side. 

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

@webwondersco 

I add on product if colour then colour if style then style, then is it possible make some changes when you choose style it shows style not colour?

 

Thanks

webwondersco
Shopify Partner
1176 169 172

@Ailyte , Yes it is possible. we have to check that with some custom development and also I need to check your product organization How you have setup.

 

Is it better if you explain by some recording or sharing screen? So I can get your way to add variant.

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

@webwondersco which information do you need?

Ailyte
Excursionist
14 0 2

@webwondersco 

My script for color:

 

<script>

const options= document.querySelector('fieldset.js.product-form__input')

const legend= options.querySelector('legend')

const labels= options.querySelectorAll('label')

const inputs= options.querySelectorAll('input')

labels.forEach((item,i)=>{

item.onclick=()=>{

legend.innerText='Colour: '+inputs[i].value

}

})

</script>

Ailyte
Excursionist
14 0 2

@webwondersco 

Maybe can you upgrade my code?

webwondersco
Shopify Partner
1176 169 172

@Ailyte , Yes I can. But I need to access your theme code as well as your products.

 

And I also want to check have you added both variant on only single varint. Like you have added color and style or only color and how to style label will appear.

 

e.g LED is style and copper is color. So when you click on copper it'll display color and when you click on LEd it'll display style label?

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

@webwondersco 

LED is style and copper is displayed in style in the product.

Style variant.

Ailyte
Excursionist
14 0 2
webwondersco
Shopify Partner
1176 169 172

This is an accepted solution.

@Ailyte , why don't you try the variant as shown in the attached screenshot? I have created separate variants for color and style.

 

webwondersco_0-1687417629375.png

 

It'll display like the below screenshot on the front end side.

 

webwondersco_1-1687417681421.png

 

Does this works for you or do you need to go with the script option?

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

Hi

 

Thanks this example yours, sorted my question.

Screenshot 2023-06-21 214306.png

 

Thanks

webwondersco
Shopify Partner
1176 169 172

I was confused about your requirement before that's why it takes this much time to solve. @Ailyte 

 

 

Web Wonders | Shopify Partner | Connect here!
- Question answered? Mark as Accepted Solution, reply helpful? Click Like
- Hire me, if you want to design, re-design, develop a store, or make changes to the pre-built store.
- a small Coffee Tip would be greatly appreciated. :)..! Instagram
Ailyte
Excursionist
14 0 2

Screenshot 2023-06-22 102143.png

@webwondersco 

Is some way how I can set and for style the same like colour,

example style: "style name" 

Thanks