Shopify.quickshopOptionsMap8125754867885 = {}; Shopify.quickshopUpdateOptionsInSelector8125754867885 = function(selectorIndex) { switch (selectorIndex) { case 0: var key = 'root'; var selector = jQuery('#product-form-quick-8125754867885 .single-option-selector:eq(0)'); break; case 1: var key = jQuery('#product-form-quick-8125754867885 .single-option-selector:eq(0)').val(); var selector = jQuery('#product-form-quick-8125754867885 .single-option-selector:eq(1)'); break; case 2: var key = jQuery('#product-form-quick-8125754867885 .single-option-selector:eq(0)').val(); key += ' / ' + jQuery('#product-form-quick-8125754867885 .single-option-selector:eq(1)').val(); var selector = jQuery('#product-form-quick-8125754867885 .single-option-selector:eq(2)'); } var initialValue = selector.val(); selector.empty(); var availableOptions = Shopify.quickshopOptionsMap8125754867885[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-8125754867885 .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.quickshopLinkOptionSelectors8125754867885 = 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.quickshopOptionsMap8125754867885['root'] = Shopify.quickshopOptionsMap8125754867885['root'] || []; Shopify.quickshopOptionsMap8125754867885['root'].push(variant.option1); Shopify.quickshopOptionsMap8125754867885['root'] = Shopify.uniq(Shopify.quickshopOptionsMap8125754867885['root']); // Gathering values for the 2nd drop-down. if (product.options.length > 1) { var key = variant.option1; Shopify.quickshopOptionsMap8125754867885[key] = Shopify.quickshopOptionsMap8125754867885[key] || []; Shopify.quickshopOptionsMap8125754867885[key].push(variant.option2); Shopify.quickshopOptionsMap8125754867885[key] = Shopify.uniq(Shopify.quickshopOptionsMap8125754867885[key]); } // Gathering values for the 3rd drop-down. if (product.options.length === 3) { var key = variant.option1 + ' / ' + variant.option2; Shopify.quickshopOptionsMap8125754867885[key] = Shopify.quickshopOptionsMap8125754867885[key] || []; Shopify.quickshopOptionsMap8125754867885[key].push(variant.option3); Shopify.quickshopOptionsMap8125754867885[key] = Shopify.uniq(Shopify.quickshopOptionsMap8125754867885[key]); } //} } // Update options right away. Shopify.quickshopUpdateOptionsInSelector8125754867885(0); if (product.options.length > 1) Shopify.quickshopUpdateOptionsInSelector8125754867885(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector8125754867885(2); // When there is an update in the first dropdown. jQuery("#product-form-quick-8125754867885 .single-option-selector:eq(0)").change(function() { Shopify.quickshopUpdateOptionsInSelector8125754867885(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector8125754867885(2); return true; }); // When there is an update in the second dropdown. jQuery("#product-form-quick-8125754867885 .single-option-selector:eq(1)").change(function() { if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector8125754867885(2); return true; }); }; productsObj.id8125754867885 = {"id":8125754867885,"title":"Tattoo Cartridge Grips- Heavy 30mm Medical Grade 316L Stainless Steel","handle":"tattoo-cartridge-grips-heavy-30mm-medical-grade-316l-stainless-steel","description":"\u003cul class=\"a-unordered-list a-vertical a-spacing-mini\"\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eMade from medical stainless steel and CNC aluminum inner core with dual stainless steel click balls,※This stainless steel tattoo cartridge grip is only fit for rotary tattoo gun and coil machine, not for pen type tattoo machine.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eMaterial:Medical 316L Stainless Steel\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eOuter Diameter:32mm;Net weight: 220g.(Weight is Great)\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eNeedle Protrusion:0-4mm\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eAdjustable system:dual stainless steel ball click and screw thread.\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e","published_at":"2025-03-31T17:08:59+08:00","created_at":"2025-03-31T17:08:59+08:00","vendor":"Discover Device","type":"Tattoo Accessories","tags":[],"price":5400,"price_min":5400,"price_max":10300,"available":true,"price_varies":true,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":44319953289389,"title":"30mm Lotus","option1":"30mm Lotus","option2":null,"option3":null,"sku":"2628-30","requires_shipping":true,"taxable":false,"featured_image":{"id":36892915499181,"product_id":8125754867885,"position":6,"created_at":"2025-03-31T17:05:50+08:00","updated_at":"2025-04-09T15:03:49+08:00","alt":null,"width":4535,"height":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1_b33c95b6-01b5-4179-886b-2e2a4b152388.jpg?v=1744182229","variant_ids":[44319953289389]},"available":true,"name":"Tattoo Cartridge Grips- Heavy 30mm Medical Grade 316L Stainless Steel - 30mm Lotus","public_title":"30mm Lotus","options":["30mm Lotus"],"price":5400,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"701555871793","featured_media":{"alt":null,"id":28793469206701,"position":6,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1_b33c95b6-01b5-4179-886b-2e2a4b152388.jpg?v=1744182229"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":44319953322157,"title":"32mm Lotus","option1":"32mm Lotus","option2":null,"option3":null,"sku":"2628-31","requires_shipping":true,"taxable":false,"featured_image":{"id":36892960653485,"product_id":8125754867885,"position":7,"created_at":"2025-03-31T17:21:14+08:00","updated_at":"2025-04-09T15:03:49+08:00","alt":null,"width":1500,"height":1500,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1109.jpg?v=1744182229","variant_ids":[44319953322157]},"available":true,"name":"Tattoo Cartridge Grips- Heavy 30mm Medical Grade 316L Stainless Steel - 32mm Lotus","public_title":"32mm Lotus","options":["32mm Lotus"],"price":5400,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"701555871809","featured_media":{"alt":null,"id":28793496305837,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1109.jpg?v=1744182229"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":44400650584237,"title":"30mm+32mm Set","option1":"30mm+32mm Set","option2":null,"option3":null,"sku":null,"requires_shipping":true,"taxable":false,"featured_image":{"id":37047663034541,"product_id":8125754867885,"position":8,"created_at":"2025-04-26T18:23:05+08:00","updated_at":"2025-04-26T19:22:40+08:00","alt":null,"width":1600,"height":1600,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/sset.jpg?v=1745666560","variant_ids":[44400650584237]},"available":true,"name":"Tattoo Cartridge Grips- Heavy 30mm Medical Grade 316L Stainless Steel - 30mm+32mm Set","public_title":"30mm+32mm Set","options":["30mm+32mm Set"],"price":10300,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","featured_media":{"alt":null,"id":28891781628077,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1600,"width":1600,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/sset.jpg?v=1745666560"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/discoverdevice.com\/cdn\/shop\/files\/6_1.jpg?v=1743412264","\/\/discoverdevice.com\/cdn\/shop\/files\/2_d9e96614-a02e-4086-ae75-361182bdd8ff.jpg?v=1743416571","\/\/discoverdevice.com\/cdn\/shop\/files\/4_fc3d6e1f-c01b-4717-86c1-a5e4dc941034.jpg?v=1743412264","\/\/discoverdevice.com\/cdn\/shop\/files\/3_10ac4e1c-1791-418b-a4fe-21a25aea8523.jpg?v=1744183370","\/\/discoverdevice.com\/cdn\/shop\/files\/5_35f50755-24af-4d8a-ac7f-84968931e90a.jpg?v=1744182229","\/\/discoverdevice.com\/cdn\/shop\/files\/1_b33c95b6-01b5-4179-886b-2e2a4b152388.jpg?v=1744182229","\/\/discoverdevice.com\/cdn\/shop\/files\/1109.jpg?v=1744182229","\/\/discoverdevice.com\/cdn\/shop\/files\/sset.jpg?v=1745666560"],"featured_image":"\/\/discoverdevice.com\/cdn\/shop\/files\/6_1.jpg?v=1743412264","options":["SIZE"],"media":[{"alt":null,"id":28793469173933,"position":1,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/6_1.jpg?v=1743412264"},"aspect_ratio":1.0,"height":4535,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/6_1.jpg?v=1743412264","width":4535},{"alt":null,"id":28793469042861,"position":2,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/2_d9e96614-a02e-4086-ae75-361182bdd8ff.jpg?v=1743416571"},"aspect_ratio":1.0,"height":4535,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/2_d9e96614-a02e-4086-ae75-361182bdd8ff.jpg?v=1743416571","width":4535},{"alt":null,"id":28793469108397,"position":3,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/4_fc3d6e1f-c01b-4717-86c1-a5e4dc941034.jpg?v=1743412264"},"aspect_ratio":1.0,"height":4535,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/4_fc3d6e1f-c01b-4717-86c1-a5e4dc941034.jpg?v=1743412264","width":4535},{"alt":null,"id":28828121596077,"position":4,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/3_10ac4e1c-1791-418b-a4fe-21a25aea8523.jpg?v=1744183370"},"aspect_ratio":1.0,"height":4535,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/3_10ac4e1c-1791-418b-a4fe-21a25aea8523.jpg?v=1744183370","width":4535},{"alt":null,"id":28793469141165,"position":5,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/5_35f50755-24af-4d8a-ac7f-84968931e90a.jpg?v=1744182229"},"aspect_ratio":1.0,"height":4535,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/5_35f50755-24af-4d8a-ac7f-84968931e90a.jpg?v=1744182229","width":4535},{"alt":null,"id":28793469206701,"position":6,"preview_image":{"aspect_ratio":1.0,"height":4535,"width":4535,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1_b33c95b6-01b5-4179-886b-2e2a4b152388.jpg?v=1744182229"},"aspect_ratio":1.0,"height":4535,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1_b33c95b6-01b5-4179-886b-2e2a4b152388.jpg?v=1744182229","width":4535},{"alt":null,"id":28793496305837,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1500,"width":1500,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1109.jpg?v=1744182229"},"aspect_ratio":1.0,"height":1500,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/1109.jpg?v=1744182229","width":1500},{"alt":null,"id":28891781628077,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1600,"width":1600,"src":"\/\/discoverdevice.com\/cdn\/shop\/files\/sset.jpg?v=1745666560"},"aspect_ratio":1.0,"height":1600,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/files\/sset.jpg?v=1745666560","width":1600}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cul class=\"a-unordered-list a-vertical a-spacing-mini\"\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eMade from medical stainless steel and CNC aluminum inner core with dual stainless steel click balls,※This stainless steel tattoo cartridge grip is only fit for rotary tattoo gun and coil machine, not for pen type tattoo machine.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eMaterial:Medical 316L Stainless Steel\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eOuter Diameter:32mm;Net weight: 220g.(Weight is Great)\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eNeedle Protrusion:0-4mm\u003c\/span\u003e\u003c\/li\u003e\n\u003cli class=\"a-spacing-mini\"\u003e\u003cspan class=\"a-list-item\"\u003eAdjustable system:dual stainless steel ball click and screw thread.\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\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-8125754867885 .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-8125754867885", { 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-8125754867885-' + 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-8125754867885 .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.quickshopOptionsMap8125754867885 = {}; Shopify.quickshopLinkOptionSelectors8125754867885(product); } } else { //single variant layout.find('form.product-form .product-options > select').remove(); var variant_field = ''; layout.find('form.product-form').append(variant_field); } });