Need two color in the variant thumbnail like half yellow and half red

Highlighted
New Member
2 0 0

This is my product page

https://www.portronics.com/products/conch-gama

instead of orange color variant thumbnail i need half yellow and half red variant thumbnail.

for example like thisCapture.PNG

How can i do this?

please help

0 Likes
Highlighted
New Member
2 0 0

if (variant) {

// Current variant select+
var form = jQuery('#' + selector.domIdPrefix).closest('form');
for (var i=0,length=variant.options.length; i<length; i++) {
var val = variant.options[i].replace(/'/g,"&#039;");
var radioButton = form.find(".swatch[data-option-index='" + i + "'] :radio[value='" + val +"']");
if (radioButton.size()) {
radioButton.get(0).checked = true;
}
}

 

This is the code im using

 

What 

0 Likes