Shopify.quickshopOptionsMap8414409654445 = {}; Shopify.quickshopUpdateOptionsInSelector8414409654445 = function(selectorIndex) { switch (selectorIndex) { case 0: var key = 'root'; var selector = jQuery('#product-form-quick-8414409654445 .single-option-selector:eq(0)'); break; case 1: var key = jQuery('#product-form-quick-8414409654445 .single-option-selector:eq(0)').val(); var selector = jQuery('#product-form-quick-8414409654445 .single-option-selector:eq(1)'); break; case 2: var key = jQuery('#product-form-quick-8414409654445 .single-option-selector:eq(0)').val(); key += ' / ' + jQuery('#product-form-quick-8414409654445 .single-option-selector:eq(1)').val(); var selector = jQuery('#product-form-quick-8414409654445 .single-option-selector:eq(2)'); } var initialValue = selector.val(); selector.empty(); var availableOptions = Shopify.quickshopOptionsMap8414409654445[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-8414409654445 .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.quickshopLinkOptionSelectors8414409654445 = 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.quickshopOptionsMap8414409654445['root'] = Shopify.quickshopOptionsMap8414409654445['root'] || []; Shopify.quickshopOptionsMap8414409654445['root'].push(variant.option1); Shopify.quickshopOptionsMap8414409654445['root'] = Shopify.uniq(Shopify.quickshopOptionsMap8414409654445['root']); // Gathering values for the 2nd drop-down. if (product.options.length > 1) { var key = variant.option1; Shopify.quickshopOptionsMap8414409654445[key] = Shopify.quickshopOptionsMap8414409654445[key] || []; Shopify.quickshopOptionsMap8414409654445[key].push(variant.option2); Shopify.quickshopOptionsMap8414409654445[key] = Shopify.uniq(Shopify.quickshopOptionsMap8414409654445[key]); } // Gathering values for the 3rd drop-down. if (product.options.length === 3) { var key = variant.option1 + ' / ' + variant.option2; Shopify.quickshopOptionsMap8414409654445[key] = Shopify.quickshopOptionsMap8414409654445[key] || []; Shopify.quickshopOptionsMap8414409654445[key].push(variant.option3); Shopify.quickshopOptionsMap8414409654445[key] = Shopify.uniq(Shopify.quickshopOptionsMap8414409654445[key]); } //} } // Update options right away. Shopify.quickshopUpdateOptionsInSelector8414409654445(0); if (product.options.length > 1) Shopify.quickshopUpdateOptionsInSelector8414409654445(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector8414409654445(2); // When there is an update in the first dropdown. jQuery("#product-form-quick-8414409654445 .single-option-selector:eq(0)").change(function() { Shopify.quickshopUpdateOptionsInSelector8414409654445(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector8414409654445(2); return true; }); // When there is an update in the second dropdown. jQuery("#product-form-quick-8414409654445 .single-option-selector:eq(1)").change(function() { if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector8414409654445(2); return true; }); }; productsObj.id8414409654445 = {"id":8414409654445,"title":"Rotary Tattoo Machine S6 New Adjustable Strokes","handle":"rotary-tattoo-machine","description":"\u003cp\u003eNew Adjustable Strokes Rotary Tattoo Machine\u003c\/p\u003e\n\u003cp\u003eNet weight: 88g\u003cbr\u003eHousing \u0026amp; Craft: CNC precision engraving of aluminum alloy\u003cbr\u003eMotor: Custom Coreless 12V \/ 11000rpm\u003cbr\u003eLiner Works: 6 to 10 volts (not exceeding 11 volts)\u003cbr\u003eShader Works : 5 to 9 volts (do not exceed 10 volts)\u003cbr\u003eAdjustable stroke: 2,2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5\u003c\/p\u003e","published_at":"2025-11-19T15:54:22+08:00","created_at":"2025-11-19T15:54:20+08:00","vendor":"Discover Device","type":"Tattoo Machine","tags":[],"price":4295,"price_min":4295,"price_max":4295,"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":45289112436909,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"8261-BK","requires_shipping":true,"taxable":true,"featured_image":{"id":38621208379565,"product_id":8414409654445,"position":1,"created_at":"2025-11-19T15:51:41+08:00","updated_at":"2025-11-19T17:21:13+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/7_9c929469-cd44-4a2b-a70b-5973145cca27.jpg?v=1763544073","variant_ids":[45289112436909]},"available":true,"name":"Rotary Tattoo Machine S6 New Adjustable Strokes - Black","public_title":"Black","options":["Black"],"price":4295,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"701555872707","featured_media":{"alt":null,"id":30118897615021,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/7_9c929469-cd44-4a2b-a70b-5973145cca27.jpg?v=1763544073"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":45289112469677,"title":"Grey","option1":"Grey","option2":null,"option3":null,"sku":"8261-GY","requires_shipping":true,"taxable":true,"featured_image":{"id":38621217554605,"product_id":8414409654445,"position":8,"created_at":"2025-11-19T16:00:27+08:00","updated_at":"2025-11-19T17:21:19+08:00","alt":null,"width":1000,"height":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/49617b567ce265a4a98519a4f33e7851.jpg?v=1763544079","variant_ids":[45289112469677]},"available":true,"name":"Rotary Tattoo Machine S6 New Adjustable Strokes - Grey","public_title":"Grey","options":["Grey"],"price":4295,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"701555872714","featured_media":{"alt":null,"id":30118906790061,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/49617b567ce265a4a98519a4f33e7851.jpg?v=1763544079"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/discoverdevice.com\/cdn\/shop\/files\/7_9c929469-cd44-4a2b-a70b-5973145cca27.jpg?v=1763544073","\/\/discoverdevice.com\/cdn\/shop\/files\/4_ff24b95d-c646-4843-928a-b5a409d67e76.jpg?v=1763544054","\/\/discoverdevice.com\/cdn\/shop\/files\/3_5aca1e3b-7bb1-48e2-b3a8-79b3ef44d0b9.jpg?v=1763544048","\/\/discoverdevice.com\/cdn\/shop\/files\/2_be61b000-78e6-45bf-8b52-f4d279f1f254.jpg?v=1763544042","\/\/discoverdevice.com\/cdn\/shop\/files\/5_9266c8df-4af8-4097-9ac2-502fcae5c200.jpg?v=1763544060","\/\/discoverdevice.com\/cdn\/shop\/files\/1_dc79f86f-f151-4e5c-9eab-c51de054ce36.jpg?v=1763544036","\/\/discoverdevice.com\/cdn\/shop\/files\/6_e310f5c1-61b0-4cfd-bd12-541b0b2919f4.jpg?v=1763544066","\/\/discoverdevice.com\/cdn\/shop\/files\/49617b567ce265a4a98519a4f33e7851.jpg?v=1763544079"],"featured_image":"\/\/discoverdevice.com\/cdn\/shop\/files\/7_9c929469-cd44-4a2b-a70b-5973145cca27.jpg?v=1763544073","options":["Color"],"media":[{"alt":null,"id":30118897615021,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/7_9c929469-cd44-4a2b-a70b-5973145cca27.jpg?v=1763544073"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/7_9c929469-cd44-4a2b-a70b-5973145cca27.jpg?v=1763544073","width":1000},{"alt":null,"id":30118897516717,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/4_ff24b95d-c646-4843-928a-b5a409d67e76.jpg?v=1763544054"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/4_ff24b95d-c646-4843-928a-b5a409d67e76.jpg?v=1763544054","width":1000},{"alt":null,"id":30118897483949,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/3_5aca1e3b-7bb1-48e2-b3a8-79b3ef44d0b9.jpg?v=1763544048"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/3_5aca1e3b-7bb1-48e2-b3a8-79b3ef44d0b9.jpg?v=1763544048","width":1000},{"alt":null,"id":30118897451181,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/2_be61b000-78e6-45bf-8b52-f4d279f1f254.jpg?v=1763544042"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/2_be61b000-78e6-45bf-8b52-f4d279f1f254.jpg?v=1763544042","width":1000},{"alt":null,"id":30118897549485,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/5_9266c8df-4af8-4097-9ac2-502fcae5c200.jpg?v=1763544060"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/5_9266c8df-4af8-4097-9ac2-502fcae5c200.jpg?v=1763544060","width":1000},{"alt":null,"id":30118897418413,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1_dc79f86f-f151-4e5c-9eab-c51de054ce36.jpg?v=1763544036"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1_dc79f86f-f151-4e5c-9eab-c51de054ce36.jpg?v=1763544036","width":1000},{"alt":null,"id":30118897582253,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/6_e310f5c1-61b0-4cfd-bd12-541b0b2919f4.jpg?v=1763544066"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/6_e310f5c1-61b0-4cfd-bd12-541b0b2919f4.jpg?v=1763544066","width":1000},{"alt":null,"id":30118906790061,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/49617b567ce265a4a98519a4f33e7851.jpg?v=1763544079"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/49617b567ce265a4a98519a4f33e7851.jpg?v=1763544079","width":1000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003eNew Adjustable Strokes Rotary Tattoo Machine\u003c\/p\u003e\n\u003cp\u003eNet weight: 88g\u003cbr\u003eHousing \u0026amp; Craft: CNC precision engraving of aluminum alloy\u003cbr\u003eMotor: Custom Coreless 12V \/ 11000rpm\u003cbr\u003eLiner Works: 6 to 10 volts (not exceeding 11 volts)\u003cbr\u003eShader Works : 5 to 9 volts (do not exceed 10 volts)\u003cbr\u003eAdjustable stroke: 2,2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5\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-8414409654445 .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-8414409654445", { 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-8414409654445-' + 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-8414409654445 .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.quickshopOptionsMap8414409654445 = {}; Shopify.quickshopLinkOptionSelectors8414409654445(product); } } else { //single variant layout.find('form.product-form .product-options > select').remove(); var variant_field = ''; layout.find('form.product-form').append(variant_field); } });