Shopify.quickshopOptionsMap2293513191478 = {}; Shopify.quickshopUpdateOptionsInSelector2293513191478 = function(selectorIndex) { switch (selectorIndex) { case 0: var key = 'root'; var selector = jQuery('#product-form-quick-2293513191478 .single-option-selector:eq(0)'); break; case 1: var key = jQuery('#product-form-quick-2293513191478 .single-option-selector:eq(0)').val(); var selector = jQuery('#product-form-quick-2293513191478 .single-option-selector:eq(1)'); break; case 2: var key = jQuery('#product-form-quick-2293513191478 .single-option-selector:eq(0)').val(); key += ' / ' + jQuery('#product-form-quick-2293513191478 .single-option-selector:eq(1)').val(); var selector = jQuery('#product-form-quick-2293513191478 .single-option-selector:eq(2)'); } var initialValue = selector.val(); selector.empty(); var availableOptions = Shopify.quickshopOptionsMap2293513191478[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-2293513191478 .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.quickshopLinkOptionSelectors2293513191478 = 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.quickshopOptionsMap2293513191478['root'] = Shopify.quickshopOptionsMap2293513191478['root'] || []; Shopify.quickshopOptionsMap2293513191478['root'].push(variant.option1); Shopify.quickshopOptionsMap2293513191478['root'] = Shopify.uniq(Shopify.quickshopOptionsMap2293513191478['root']); // Gathering values for the 2nd drop-down. if (product.options.length > 1) { var key = variant.option1; Shopify.quickshopOptionsMap2293513191478[key] = Shopify.quickshopOptionsMap2293513191478[key] || []; Shopify.quickshopOptionsMap2293513191478[key].push(variant.option2); Shopify.quickshopOptionsMap2293513191478[key] = Shopify.uniq(Shopify.quickshopOptionsMap2293513191478[key]); } // Gathering values for the 3rd drop-down. if (product.options.length === 3) { var key = variant.option1 + ' / ' + variant.option2; Shopify.quickshopOptionsMap2293513191478[key] = Shopify.quickshopOptionsMap2293513191478[key] || []; Shopify.quickshopOptionsMap2293513191478[key].push(variant.option3); Shopify.quickshopOptionsMap2293513191478[key] = Shopify.uniq(Shopify.quickshopOptionsMap2293513191478[key]); } //} } // Update options right away. Shopify.quickshopUpdateOptionsInSelector2293513191478(0); if (product.options.length > 1) Shopify.quickshopUpdateOptionsInSelector2293513191478(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2293513191478(2); // When there is an update in the first dropdown. jQuery("#product-form-quick-2293513191478 .single-option-selector:eq(0)").change(function() { Shopify.quickshopUpdateOptionsInSelector2293513191478(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2293513191478(2); return true; }); // When there is an update in the second dropdown. jQuery("#product-form-quick-2293513191478 .single-option-selector:eq(1)").change(function() { if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2293513191478(2); return true; }); }; productsObj.id2293513191478 = {"id":2293513191478,"title":"DISCOVER DEVICE® Pro Goat Rotary Tattoo Machine","handle":"8v-11000rpm-goat-rotary-tattoo-machine","description":"This powerful slider module tattoo machine,build to last and featured with precision,fluent,stable and durable.\u003cbr\u003eIts capable of lining,coloring,shader.\u003cbr\u003e \u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003eProduct name: professional tattoo motor\u003c\/li\u003e\n\u003cli\u003eMaterial: high quality aluminum alloy\u003c\/li\u003e\n\u003cli\u003eProcess: CNC fine carving\u003c\/li\u003e\n\u003cli\u003eMotor: brushless motor 8V 11000 RPM\u003c\/li\u003e\n\u003cli\u003eNet weight: 98 grams\u003c\/li\u003e\n\u003cli\u003eGross weight: 176 g\u003c\/li\u003e\n\u003cli\u003eStroke: 3.5 mm\u003c\/li\u003e\n\u003cli\u003eCard buckle: 8 mm\u003c\/li\u003e\n\u003cli\u003eConnection: RCA\u003c\/li\u003e\n\u003cli\u003eWorking voltage: 3-8.5v working voltage: 6V DC (maximum voltage must not exceed 7.5v)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cbr\u003e* Lubricating the machine every two or three weeks is recommended.\u003cbr\u003e* Do not operate the machine with over 7.5 Voltage.\u003c\/p\u003e\n\u003cp\u003eThe listed pricing is without grip.\u003c\/p\u003e","published_at":"2019-08-24T19:16:37+08:00","created_at":"2019-08-24T19:19:33+08:00","vendor":"Discover Device","type":"Tattoo Machine","tags":[],"price":10095,"price_min":10095,"price_max":10095,"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":32121679642726,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"8003-BK","requires_shipping":true,"taxable":false,"featured_image":{"id":15594442293350,"product_id":2293513191478,"position":8,"created_at":"2020-10-06T09:08:02+08:00","updated_at":"2020-10-06T09:12:09+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BK.jpg?v=1601946729","variant_ids":[32121679642726]},"available":true,"name":"DISCOVER DEVICE® Pro Goat Rotary Tattoo Machine - Black","public_title":"Black","options":["Black"],"price":10095,"weight":300,"compare_at_price":null,"inventory_management":"shopify","barcode":"745396547332","featured_media":{"alt":null,"id":7769849331814,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BK.jpg?v=1601946729"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":32121679675494,"title":"Blue","option1":"Blue","option2":null,"option3":null,"sku":"8003-BL","requires_shipping":true,"taxable":false,"featured_image":{"id":15594442358886,"product_id":2293513191478,"position":9,"created_at":"2020-10-06T09:08:03+08:00","updated_at":"2020-10-06T09:10:03+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BL.jpg?v=1601946603","variant_ids":[32121679675494]},"available":true,"name":"DISCOVER DEVICE® Pro Goat Rotary Tattoo Machine - Blue","public_title":"Blue","options":["Blue"],"price":10095,"weight":300,"compare_at_price":null,"inventory_management":"shopify","barcode":"745396547349","featured_media":{"alt":null,"id":7769849397350,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BL.jpg?v=1601946603"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":32121679708262,"title":"Red","option1":"Red","option2":null,"option3":null,"sku":"8003-RD","requires_shipping":true,"taxable":false,"featured_image":{"id":15594442522726,"product_id":2293513191478,"position":11,"created_at":"2020-10-06T09:08:06+08:00","updated_at":"2020-10-06T09:10:01+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-RD.jpg?v=1601946601","variant_ids":[32121679708262]},"available":true,"name":"DISCOVER DEVICE® Pro Goat Rotary Tattoo Machine - Red","public_title":"Red","options":["Red"],"price":10095,"weight":300,"compare_at_price":null,"inventory_management":"shopify","barcode":"745396547356","featured_media":{"alt":null,"id":7769849561190,"position":11,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-RD.jpg?v=1601946601"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":32121679741030,"title":"Silver","option1":"Silver","option2":null,"option3":null,"sku":"8003-SL","requires_shipping":true,"taxable":false,"featured_image":{"id":15594442391654,"product_id":2293513191478,"position":10,"created_at":"2020-10-06T09:08:04+08:00","updated_at":"2020-10-06T09:10:03+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-SL.jpg?v=1601946603","variant_ids":[32121679741030]},"available":true,"name":"DISCOVER DEVICE® Pro Goat Rotary Tattoo Machine - Silver","public_title":"Silver","options":["Silver"],"price":10095,"weight":300,"compare_at_price":null,"inventory_management":"shopify","barcode":"745396547363","featured_media":{"alt":null,"id":7769849430118,"position":10,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-SL.jpg?v=1601946603"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/discoverdevice.com\/cdn\/shop\/products\/2_6dbcc6f1-69a6-406d-81b7-000a0ecff03f.jpg?v=1572353903","\/\/discoverdevice.com\/cdn\/shop\/products\/1_dd631d4c-8543-4296-92ab-d827125a519c.jpg?v=1572353899","\/\/discoverdevice.com\/cdn\/shop\/products\/3_2a20bb95-c83b-4cd7-970e-85847cffd8b3.jpg?v=1572353791","\/\/discoverdevice.com\/cdn\/shop\/products\/5_8ce525a0-647b-44cb-a934-eb479854dbf1.jpg?v=1572353790","\/\/discoverdevice.com\/cdn\/shop\/products\/4_2298184a-7a62-497f-92c5-162775e94c40.jpg?v=1572353788","\/\/discoverdevice.com\/cdn\/shop\/products\/8_53cf2dff-a013-4793-bd6a-db5d9eeb43f7.jpg?v=1572353680","\/\/discoverdevice.com\/cdn\/shop\/products\/7_1338de1f-4185-46aa-a71c-09e7b181037c.jpg?v=1572353680","\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BK.jpg?v=1601946729","\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BL.jpg?v=1601946603","\/\/discoverdevice.com\/cdn\/shop\/products\/8003-SL.jpg?v=1601946603","\/\/discoverdevice.com\/cdn\/shop\/products\/8003-RD.jpg?v=1601946601"],"featured_image":"\/\/discoverdevice.com\/cdn\/shop\/products\/2_6dbcc6f1-69a6-406d-81b7-000a0ecff03f.jpg?v=1572353903","options":["Color"],"media":[{"alt":null,"id":2163631095862,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/2_6dbcc6f1-69a6-406d-81b7-000a0ecff03f.jpg?v=1572353903"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/2_6dbcc6f1-69a6-406d-81b7-000a0ecff03f.jpg?v=1572353903","width":1000},{"alt":null,"id":2163631128630,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/1_dd631d4c-8543-4296-92ab-d827125a519c.jpg?v=1572353899"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/1_dd631d4c-8543-4296-92ab-d827125a519c.jpg?v=1572353899","width":1000},{"alt":null,"id":2163631161398,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/3_2a20bb95-c83b-4cd7-970e-85847cffd8b3.jpg?v=1572353791"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/3_2a20bb95-c83b-4cd7-970e-85847cffd8b3.jpg?v=1572353791","width":1000},{"alt":null,"id":2163631194166,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/5_8ce525a0-647b-44cb-a934-eb479854dbf1.jpg?v=1572353790"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/5_8ce525a0-647b-44cb-a934-eb479854dbf1.jpg?v=1572353790","width":1000},{"alt":null,"id":2163631259702,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/4_2298184a-7a62-497f-92c5-162775e94c40.jpg?v=1572353788"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/4_2298184a-7a62-497f-92c5-162775e94c40.jpg?v=1572353788","width":1000},{"alt":null,"id":2163631423542,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8_53cf2dff-a013-4793-bd6a-db5d9eeb43f7.jpg?v=1572353680"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8_53cf2dff-a013-4793-bd6a-db5d9eeb43f7.jpg?v=1572353680","width":1000},{"alt":null,"id":2163631489078,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/7_1338de1f-4185-46aa-a71c-09e7b181037c.jpg?v=1572353680"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/7_1338de1f-4185-46aa-a71c-09e7b181037c.jpg?v=1572353680","width":1000},{"alt":null,"id":7769849331814,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BK.jpg?v=1601946729"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BK.jpg?v=1601946729","width":1000},{"alt":null,"id":7769849397350,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BL.jpg?v=1601946603"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-BL.jpg?v=1601946603","width":1000},{"alt":null,"id":7769849430118,"position":10,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-SL.jpg?v=1601946603"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-SL.jpg?v=1601946603","width":1000},{"alt":null,"id":7769849561190,"position":11,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-RD.jpg?v=1601946601"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/8003-RD.jpg?v=1601946601","width":1000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"This powerful slider module tattoo machine,build to last and featured with precision,fluent,stable and durable.\u003cbr\u003eIts capable of lining,coloring,shader.\u003cbr\u003e \u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003eProduct name: professional tattoo motor\u003c\/li\u003e\n\u003cli\u003eMaterial: high quality aluminum alloy\u003c\/li\u003e\n\u003cli\u003eProcess: CNC fine carving\u003c\/li\u003e\n\u003cli\u003eMotor: brushless motor 8V 11000 RPM\u003c\/li\u003e\n\u003cli\u003eNet weight: 98 grams\u003c\/li\u003e\n\u003cli\u003eGross weight: 176 g\u003c\/li\u003e\n\u003cli\u003eStroke: 3.5 mm\u003c\/li\u003e\n\u003cli\u003eCard buckle: 8 mm\u003c\/li\u003e\n\u003cli\u003eConnection: RCA\u003c\/li\u003e\n\u003cli\u003eWorking voltage: 3-8.5v working voltage: 6V DC (maximum voltage must not exceed 7.5v)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cbr\u003e* Lubricating the machine every two or three weeks is recommended.\u003cbr\u003e* Do not operate the machine with over 7.5 Voltage.\u003c\/p\u003e\n\u003cp\u003eThe listed pricing is without grip.\u003c\/p\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-2293513191478 .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-2293513191478", { 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-2293513191478-' + 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-2293513191478 .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.quickshopOptionsMap2293513191478 = {}; Shopify.quickshopLinkOptionSelectors2293513191478(product); } } else { //single variant layout.find('form.product-form .product-options > select').remove(); var variant_field = ''; layout.find('form.product-form').append(variant_field); } });