Shopify.quickshopOptionsMap2252053119030 = {}; Shopify.quickshopUpdateOptionsInSelector2252053119030 = function(selectorIndex) { switch (selectorIndex) { case 0: var key = 'root'; var selector = jQuery('#product-form-quick-2252053119030 .single-option-selector:eq(0)'); break; case 1: var key = jQuery('#product-form-quick-2252053119030 .single-option-selector:eq(0)').val(); var selector = jQuery('#product-form-quick-2252053119030 .single-option-selector:eq(1)'); break; case 2: var key = jQuery('#product-form-quick-2252053119030 .single-option-selector:eq(0)').val(); key += ' / ' + jQuery('#product-form-quick-2252053119030 .single-option-selector:eq(1)').val(); var selector = jQuery('#product-form-quick-2252053119030 .single-option-selector:eq(2)'); } var initialValue = selector.val(); selector.empty(); var availableOptions = Shopify.quickshopOptionsMap2252053119030[key]; if (availableOptions && availableOptions.length) { for (var i = 0; i < availableOptions.length; i++) { var option = availableOptions[i]; var newOption = jQuery('').val(option).html(option); selector.append(newOption); } jQuery('#product-form-quick-2252053119030 .swatch[data-option-index="' + selectorIndex + '"] .swatch-element').each(function() { if (jQuery.inArray(jQuery(this).attr('data-value'), availableOptions) !== -1) { jQuery(this).removeClass('soldout').show().find(':radio').removeAttr('disabled', 'disabled').removeAttr('checked'); } else { jQuery(this).addClass('soldout').hide().find(':radio').removeAttr('checked').attr('disabled', 'disabled'); } }); if (jQuery.inArray(initialValue, availableOptions) !== -1) { selector.val(initialValue); } selector.trigger('change'); } }; Shopify.quickshopLinkOptionSelectors2252053119030 = function(product) { // Building our mapping object. for (var i = 0; i < product.variants.length; i++) { var variant = product.variants[i]; //if (variant.available) { // Gathering values for the 1st drop-down. Shopify.quickshopOptionsMap2252053119030['root'] = Shopify.quickshopOptionsMap2252053119030['root'] || []; Shopify.quickshopOptionsMap2252053119030['root'].push(variant.option1); Shopify.quickshopOptionsMap2252053119030['root'] = Shopify.uniq(Shopify.quickshopOptionsMap2252053119030['root']); // Gathering values for the 2nd drop-down. if (product.options.length > 1) { var key = variant.option1; Shopify.quickshopOptionsMap2252053119030[key] = Shopify.quickshopOptionsMap2252053119030[key] || []; Shopify.quickshopOptionsMap2252053119030[key].push(variant.option2); Shopify.quickshopOptionsMap2252053119030[key] = Shopify.uniq(Shopify.quickshopOptionsMap2252053119030[key]); } // Gathering values for the 3rd drop-down. if (product.options.length === 3) { var key = variant.option1 + ' / ' + variant.option2; Shopify.quickshopOptionsMap2252053119030[key] = Shopify.quickshopOptionsMap2252053119030[key] || []; Shopify.quickshopOptionsMap2252053119030[key].push(variant.option3); Shopify.quickshopOptionsMap2252053119030[key] = Shopify.uniq(Shopify.quickshopOptionsMap2252053119030[key]); } //} } // Update options right away. Shopify.quickshopUpdateOptionsInSelector2252053119030(0); if (product.options.length > 1) Shopify.quickshopUpdateOptionsInSelector2252053119030(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2252053119030(2); // When there is an update in the first dropdown. jQuery("#product-form-quick-2252053119030 .single-option-selector:eq(0)").change(function() { Shopify.quickshopUpdateOptionsInSelector2252053119030(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2252053119030(2); return true; }); // When there is an update in the second dropdown. jQuery("#product-form-quick-2252053119030 .single-option-selector:eq(1)").change(function() { if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2252053119030(2); return true; }); }; productsObj.id2252053119030 = {"id":2252053119030,"title":"DISCOVER DEVICE® Ultra Thin Tattoo Clip Cord 2.2M","handle":"discover-device-ultra-thin-tattoo-clip-cord-2-2m","description":"Ultra Thin High Duty Clip Cord \u003cbr\u003e\u003cbr\u003eLightweight and convenient,light as wireless.40 oxygen free copper wires,stable conduction,low loss,resistant to breaking.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eProduct parameters\u003c\/strong\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003eLength: 2.2 m.\u003c\/li\u003e\n\u003cli\u003eOuter wire cover diameter: 2mm.\u003c\/li\u003e\n\u003cli\u003eCore: 40 copper oxide free and tin plating.\u003c\/li\u003e\n\u003cli\u003eNet weight 29g.\u003c\/li\u003e\n\u003cli\u003eGross weight 32g.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cbr\u003e\u003cstrong\u003eProduct features\u003c\/strong\u003e\u003cbr\u003e\u003cbr\u003e1. The total length is 220 cm, which ensures sufficient working length;\u003cbr\u003e2. The wire diameter of 2mm is soft and comfortable,as light as wireless, and does not bind hands in the working process;\u003cbr\u003e3. Strong tensile resistance wire internal blended tensile resistance fiber two-way force of a total of 58 kg;\u003cbr\u003e4. Strong electrical conductivity meets the requirement of doubling the number of offline diameters under normal working conditions;\u003cbr\u003e5. the shaft does not rotate.\u003cbr\u003e6. The 1\/4'' phone jack plug looks smaller and comfortable to plug in;\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eDesigned and Built by the professionals for the professionals.\u003c\/strong\u003e","published_at":"2019-08-02T21:44:16+08:00","created_at":"2019-08-02T21:52:16+08:00","vendor":"Discover Device","type":"Tattoo Accessories","tags":[],"price":2195,"price_min":2195,"price_max":2195,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":21038378352694,"title":"black","option1":"black","option2":null,"option3":null,"sku":"1430-BK","requires_shipping":true,"taxable":false,"featured_image":{"id":7839941034038,"product_id":2252053119030,"position":7,"created_at":"2019-08-02T21:56:46+08:00","updated_at":"2019-10-29T20:04:09+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Black.jpg?v=1572350649","variant_ids":[21038378352694]},"available":true,"name":"DISCOVER DEVICE® Ultra Thin Tattoo Clip Cord 2.2M - black","public_title":"black","options":["black"],"price":2195,"weight":50,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":2010392166454,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Black.jpg?v=1572350649"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":21038378385462,"title":"green","option1":"green","option2":null,"option3":null,"sku":"1430-GR","requires_shipping":true,"taxable":false,"featured_image":{"id":7839945162806,"product_id":2252053119030,"position":2,"created_at":"2019-08-02T21:58:38+08:00","updated_at":"2019-10-29T20:06:07+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Green_46425c4a-d4a1-414e-8bf4-cd34abfa9cd2.jpg?v=1572350767","variant_ids":[21038378385462]},"available":true,"name":"DISCOVER DEVICE® Ultra Thin Tattoo Clip Cord 2.2M - green","public_title":"green","options":["green"],"price":2195,"weight":50,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":2010394558518,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Green_46425c4a-d4a1-414e-8bf4-cd34abfa9cd2.jpg?v=1572350767"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":21038378418230,"title":"orange","option1":"orange","option2":null,"option3":null,"sku":"1430-OR","requires_shipping":true,"taxable":false,"featured_image":{"id":7839942082614,"product_id":2252053119030,"position":5,"created_at":"2019-08-02T21:57:12+08:00","updated_at":"2019-10-29T20:04:08+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Orange.jpg?v=1572350648","variant_ids":[21038378418230]},"available":true,"name":"DISCOVER DEVICE® Ultra Thin Tattoo Clip Cord 2.2M - orange","public_title":"orange","options":["orange"],"price":2195,"weight":50,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":2010392657974,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Orange.jpg?v=1572350648"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":21038378450998,"title":"red","option1":"red","option2":null,"option3":null,"sku":"1430-RD","requires_shipping":true,"taxable":false,"featured_image":{"id":7839943229494,"product_id":2252053119030,"position":4,"created_at":"2019-08-02T21:57:41+08:00","updated_at":"2019-10-29T20:06:08+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Red.jpg?v=1572350768","variant_ids":[21038378450998]},"available":true,"name":"DISCOVER DEVICE® Ultra Thin Tattoo Clip Cord 2.2M - red","public_title":"red","options":["red"],"price":2195,"weight":50,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":2010393280566,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Red.jpg?v=1572350768"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":21038378483766,"title":"teal","option1":"teal","option2":null,"option3":null,"sku":"1430-TE","requires_shipping":true,"taxable":false,"featured_image":{"id":7839944245302,"product_id":2252053119030,"position":3,"created_at":"2019-08-02T21:58:08+08:00","updated_at":"2019-10-29T20:06:10+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Teal.jpg?v=1572350770","variant_ids":[21038378483766]},"available":true,"name":"DISCOVER DEVICE® Ultra Thin Tattoo Clip Cord 2.2M - teal","public_title":"teal","options":["teal"],"price":2195,"weight":50,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":2010394001462,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Teal.jpg?v=1572350770"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/discoverdevice.com\/cdn\/shop\/products\/2_7003be3a-602f-41b8-ae96-fbe7bb38a0f7.jpg?v=1572350890","\/\/discoverdevice.com\/cdn\/shop\/products\/Green_46425c4a-d4a1-414e-8bf4-cd34abfa9cd2.jpg?v=1572350767","\/\/discoverdevice.com\/cdn\/shop\/products\/Teal.jpg?v=1572350770","\/\/discoverdevice.com\/cdn\/shop\/products\/Red.jpg?v=1572350768","\/\/discoverdevice.com\/cdn\/shop\/products\/Orange.jpg?v=1572350648","\/\/discoverdevice.com\/cdn\/shop\/products\/Green.jpg?v=1572350649","\/\/discoverdevice.com\/cdn\/shop\/products\/Black.jpg?v=1572350649","\/\/discoverdevice.com\/cdn\/shop\/products\/3_2277a6d3-4dc9-4c24-a786-009d301a9327.jpg?v=1572350521","\/\/discoverdevice.com\/cdn\/shop\/products\/1_64cba8ab-16d6-4ee6-9eb6-a7a85ac0bfcd.jpg?v=1572350526","\/\/discoverdevice.com\/cdn\/shop\/products\/5_d4e038da-34d3-4b9f-93d9-926437759ed9.jpg?v=1572350525","\/\/discoverdevice.com\/cdn\/shop\/products\/6_dca20745-8071-447a-8c8b-da60c6785ed7.jpg?v=1572350413"],"featured_image":"\/\/discoverdevice.com\/cdn\/shop\/products\/2_7003be3a-602f-41b8-ae96-fbe7bb38a0f7.jpg?v=1572350890","options":["Color"],"media":[{"alt":null,"id":2010387873846,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/2_7003be3a-602f-41b8-ae96-fbe7bb38a0f7.jpg?v=1572350890"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/2_7003be3a-602f-41b8-ae96-fbe7bb38a0f7.jpg?v=1572350890","width":1000},{"alt":null,"id":2010394558518,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Green_46425c4a-d4a1-414e-8bf4-cd34abfa9cd2.jpg?v=1572350767"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Green_46425c4a-d4a1-414e-8bf4-cd34abfa9cd2.jpg?v=1572350767","width":1000},{"alt":null,"id":2010394001462,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Teal.jpg?v=1572350770"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Teal.jpg?v=1572350770","width":1000},{"alt":null,"id":2010393280566,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Red.jpg?v=1572350768"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Red.jpg?v=1572350768","width":1000},{"alt":null,"id":2010392657974,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Orange.jpg?v=1572350648"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Orange.jpg?v=1572350648","width":1000},{"alt":null,"id":2010392625206,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Green.jpg?v=1572350649"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Green.jpg?v=1572350649","width":1000},{"alt":null,"id":2010392166454,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Black.jpg?v=1572350649"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Black.jpg?v=1572350649","width":1000},{"alt":null,"id":2010388004918,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/3_2277a6d3-4dc9-4c24-a786-009d301a9327.jpg?v=1572350521"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/3_2277a6d3-4dc9-4c24-a786-009d301a9327.jpg?v=1572350521","width":1000},{"alt":null,"id":2010388037686,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/1_64cba8ab-16d6-4ee6-9eb6-a7a85ac0bfcd.jpg?v=1572350526"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/1_64cba8ab-16d6-4ee6-9eb6-a7a85ac0bfcd.jpg?v=1572350526","width":1000},{"alt":null,"id":2010388070454,"position":10,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/5_d4e038da-34d3-4b9f-93d9-926437759ed9.jpg?v=1572350525"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/5_d4e038da-34d3-4b9f-93d9-926437759ed9.jpg?v=1572350525","width":1000},{"alt":null,"id":2010388234294,"position":11,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/6_dca20745-8071-447a-8c8b-da60c6785ed7.jpg?v=1572350413"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/6_dca20745-8071-447a-8c8b-da60c6785ed7.jpg?v=1572350413","width":1000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"Ultra Thin High Duty Clip Cord \u003cbr\u003e\u003cbr\u003eLightweight and convenient,light as wireless.40 oxygen free copper wires,stable conduction,low loss,resistant to breaking.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eProduct parameters\u003c\/strong\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003eLength: 2.2 m.\u003c\/li\u003e\n\u003cli\u003eOuter wire cover diameter: 2mm.\u003c\/li\u003e\n\u003cli\u003eCore: 40 copper oxide free and tin plating.\u003c\/li\u003e\n\u003cli\u003eNet weight 29g.\u003c\/li\u003e\n\u003cli\u003eGross weight 32g.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cbr\u003e\u003cstrong\u003eProduct features\u003c\/strong\u003e\u003cbr\u003e\u003cbr\u003e1. The total length is 220 cm, which ensures sufficient working length;\u003cbr\u003e2. The wire diameter of 2mm is soft and comfortable,as light as wireless, and does not bind hands in the working process;\u003cbr\u003e3. Strong tensile resistance wire internal blended tensile resistance fiber two-way force of a total of 58 kg;\u003cbr\u003e4. Strong electrical conductivity meets the requirement of doubling the number of offline diameters under normal working conditions;\u003cbr\u003e5. the shaft does not rotate.\u003cbr\u003e6. The 1\/4'' phone jack plug looks smaller and comfortable to plug in;\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eDesigned and Built by the professionals for the professionals.\u003c\/strong\u003e"}; selectCallback = function(variant, selector) { if (variant) { if (variant.available) { if (variant.compare_at_price > variant.price) { $(".price-box .price").html('' + Shopify.formatMoney(variant.compare_at_price, money_format) + "" + ' ' + Shopify.formatMoney(variant.price, money_format) + "") } else { $(".price-box .price").html('' + Shopify.formatMoney(variant.price, money_format) + ""); } woodmart_settings.enableCurrency && currenciesCallbackSpecial(".price-box span.money"),$(".single_add_to_cart_button").removeClass("disabled").removeAttr("disabled").html(window.inventory_text.add_to_cart); }else{ $("#product-form-quick-2252053119030 .single_add_to_cart_button").html(window.inventory_text.sold_out).addClass("disabled").attr("disabled", "disabled"); } if(swatch_color_type == '1' || swatch_color_type == '2'){ var form = $('#' + selector.domIdPrefix).closest('form'); for (var i=0,length=variant.options.length; i= 1) { //multiple variants for (var i = 0; i < product.variants.length; i++) { var variant = product.variants[i]; var option = ''; layout.find('form.product-form > select').append(option); } new Shopify.OptionSelectors("product-selectors-2252053119030", { product: product, onVariantSelected: selectCallback, enableHistoryState: true }); var filePath = asset_url.substring(0, asset_url.lastIndexOf('/')); var assetUrl = asset_url.substring(0, asset_url.lastIndexOf('/')); var options = ""; for (var i = 0; i < product.options.length; i++) { options += '
'; options += '
' + product.options[i] + ':
'; options += '
'; var is_color = false; var is_circle = 'circle'; if (/Color|Colour/i.test(product.options[i])) { is_color = true; } if (swatch_color_type == '2') { is_color = false; is_circle = ''; } var optionValues = new Array(); for (var j = 0; j < product.variants.length; j++) { var variant = product.variants[j]; var value = variant.options[i]; if(variant.featured_image && woodmart_settings.product_data.product_swatch_setting == '2'){ var img = variant.featured_image.src.lastIndexOf("."); var vimg = variant.featured_image.src.slice(0, img) + "_50x50_crop_center" + variant.featured_image.src.slice(img); } var valueHandle = convertToSlug(value); var forText = 'swatch-2252053119030-' + i + '-' + valueHandle; if (optionValues.indexOf(value) < 0) { options += '
'; if (is_color) { options += '
' + value + '
'; } options += ''; if (is_color) { if(vimg && woodmart_settings.product_data.product_swatch_setting == '2'){ options += ''; }else{ options += ''; } } else { options += ''; } options += '
'; if (variant.available) { $('#product-form-quick-2252053119030 .swatch[data-option-index="' + i + '"] .' + valueHandle).removeClass('soldout').addClass('available').find(':radio').removeAttr('disabled'); } optionValues.push(value); } } options += '
'; options += '
'; } if(swatch_color_type == '1' || swatch_color_type == '2'){ layout.find('form.product-form .product-options > select').after(options); layout.find('.swatch :radio').change(function() { var optionIndex = $(this).closest('.swatch').attr('data-option-index'); var optionValue = $(this).val(); $(this) .closest('form') .find('.single-option-selector') .eq(optionIndex) .val(optionValue) .trigger('change'); }); } if (product.available) { Shopify.quickshopOptionsMap2252053119030 = {}; Shopify.quickshopLinkOptionSelectors2252053119030(product); } } else { //single variant layout.find('form.product-form .product-options > select').remove(); var variant_field = ''; layout.find('form.product-form').append(variant_field); } });