Shopify.quickshopOptionsMap4647085604966 = {}; Shopify.quickshopUpdateOptionsInSelector4647085604966 = function(selectorIndex) { switch (selectorIndex) { case 0: var key = 'root'; var selector = jQuery('#product-form-quick-4647085604966 .single-option-selector:eq(0)'); break; case 1: var key = jQuery('#product-form-quick-4647085604966 .single-option-selector:eq(0)').val(); var selector = jQuery('#product-form-quick-4647085604966 .single-option-selector:eq(1)'); break; case 2: var key = jQuery('#product-form-quick-4647085604966 .single-option-selector:eq(0)').val(); key += ' / ' + jQuery('#product-form-quick-4647085604966 .single-option-selector:eq(1)').val(); var selector = jQuery('#product-form-quick-4647085604966 .single-option-selector:eq(2)'); } var initialValue = selector.val(); selector.empty(); var availableOptions = Shopify.quickshopOptionsMap4647085604966[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-4647085604966 .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.quickshopLinkOptionSelectors4647085604966 = 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.quickshopOptionsMap4647085604966['root'] = Shopify.quickshopOptionsMap4647085604966['root'] || []; Shopify.quickshopOptionsMap4647085604966['root'].push(variant.option1); Shopify.quickshopOptionsMap4647085604966['root'] = Shopify.uniq(Shopify.quickshopOptionsMap4647085604966['root']); // Gathering values for the 2nd drop-down. if (product.options.length > 1) { var key = variant.option1; Shopify.quickshopOptionsMap4647085604966[key] = Shopify.quickshopOptionsMap4647085604966[key] || []; Shopify.quickshopOptionsMap4647085604966[key].push(variant.option2); Shopify.quickshopOptionsMap4647085604966[key] = Shopify.uniq(Shopify.quickshopOptionsMap4647085604966[key]); } // Gathering values for the 3rd drop-down. if (product.options.length === 3) { var key = variant.option1 + ' / ' + variant.option2; Shopify.quickshopOptionsMap4647085604966[key] = Shopify.quickshopOptionsMap4647085604966[key] || []; Shopify.quickshopOptionsMap4647085604966[key].push(variant.option3); Shopify.quickshopOptionsMap4647085604966[key] = Shopify.uniq(Shopify.quickshopOptionsMap4647085604966[key]); } //} } // Update options right away. Shopify.quickshopUpdateOptionsInSelector4647085604966(0); if (product.options.length > 1) Shopify.quickshopUpdateOptionsInSelector4647085604966(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector4647085604966(2); // When there is an update in the first dropdown. jQuery("#product-form-quick-4647085604966 .single-option-selector:eq(0)").change(function() { Shopify.quickshopUpdateOptionsInSelector4647085604966(1); if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector4647085604966(2); return true; }); // When there is an update in the second dropdown. jQuery("#product-form-quick-4647085604966 .single-option-selector:eq(1)").change(function() { if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector4647085604966(2); return true; }); }; productsObj.id4647085604966 = {"id":4647085604966,"title":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs","handle":"discover-cushion-cartridge-needle-0-30mm-bugpin-round-magnum-box-of-10pcs","description":"\u003cstrong\u003eDiscover Cushion Cartridge System\u003c\/strong\u003e featured with a soft rubber cushion that fits cheyenne cartridge needles.\u003cbr\u003e10pcs per pack and pre-sterilized by E.O.gas.\u003cbr\u003e\n\u003cdiv style=\"text-align: left;\" data-mce-fragment=\"1\" data-mce-style=\"text-align: left;\"\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/970x600banner.jpg?v=1662357495\" alt=\"\" style=\"float: none;\" data-mce-fragment=\"1\" data-mce-style=\"float: none;\" data-mce-src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/970x600banner.jpg?v=1662357495\"\u003e\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\" data-mce-fragment=\"1\" data-mce-style=\"text-align: left;\"\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/banner2.jpg?v=1662100544\" style=\"float: none;\"\u003e\u003c\/div\u003e\n\u003cbr\u003e\u003cstrong\u003eItem Details\u003c\/strong\u003e\u003cbr\u003e1.made of medical grade of plastic and stainless steel.\u003cbr\u003e2.0.30mm needles with medium taper.Used for detail and soft coloring,blending works.\u003cbr\u003e3.sizes available by \u003cstrong\u003e1005RM,1007RM,1009RM,1011RM,1013RM,1015RM (0.30mm).\u003c\/strong\u003e\u003cbr\u003e4.sterilized by E.O. gas.\u003cbr\u003e5.box of 10pcs.\u003cbr\u003e6.the cushion enlarges the outer diameter of needle cartridge and make it more fit with the pen.\u003cbr\u003e7.cushion come with anti-skid groove desing,that features with shock absorption and reduce fatigue.","published_at":"2020-02-27T15:59:09+08:00","created_at":"2020-02-27T16:50:27+08:00","vendor":"Discover Device","type":"Tattoo Needle Cartridge","tags":["TATTOO CATRIDGE NEEDLE"],"price":795,"price_min":795,"price_max":895,"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":31460763631718,"title":"1005RM","option1":"1005RM","option2":null,"option3":null,"sku":"CC1005RM","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs - 1005RM","public_title":"1005RM","options":["1005RM"],"price":795,"weight":100,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":31460763664486,"title":"1007RM","option1":"1007RM","option2":null,"option3":null,"sku":"CC1007RM","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs - 1007RM","public_title":"1007RM","options":["1007RM"],"price":895,"weight":100,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":31460763697254,"title":"1009RM","option1":"1009RM","option2":null,"option3":null,"sku":"CC1009RM","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs - 1009RM","public_title":"1009RM","options":["1009RM"],"price":895,"weight":100,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":31460763730022,"title":"1011RM","option1":"1011RM","option2":null,"option3":null,"sku":"CC1011RM","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs - 1011RM","public_title":"1011RM","options":["1011RM"],"price":895,"weight":100,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":31460763762790,"title":"1013RM","option1":"1013RM","option2":null,"option3":null,"sku":"CC1013RM","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs - 1013RM","public_title":"1013RM","options":["1013RM"],"price":895,"weight":100,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":31460763795558,"title":"1015RM","option1":"1015RM","option2":null,"option3":null,"sku":"CC1015RM","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"DISCOVER DEVICE® Cushion Cartridge Needle 0.30mm Bugpin Round Magnum Box of 10pcs - 1015RM","public_title":"1015RM","options":["1015RM"],"price":895,"weight":100,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_1.jpg?v=1582793447","\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_2.jpg?v=1582793448","\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_3.jpg?v=1582793447"],"featured_image":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_1.jpg?v=1582793447","options":["Item"],"media":[{"alt":null,"id":6308553654374,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_1.jpg?v=1582793447"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_1.jpg?v=1582793447","width":1000},{"alt":null,"id":6308553687142,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_2.jpg?v=1582793448"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_2.jpg?v=1582793448","width":1000},{"alt":null,"id":6308553719910,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_3.jpg?v=1582793447"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/DISCOVER_3.jpg?v=1582793447","width":1000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cstrong\u003eDiscover Cushion Cartridge System\u003c\/strong\u003e featured with a soft rubber cushion that fits cheyenne cartridge needles.\u003cbr\u003e10pcs per pack and pre-sterilized by E.O.gas.\u003cbr\u003e\n\u003cdiv style=\"text-align: left;\" data-mce-fragment=\"1\" data-mce-style=\"text-align: left;\"\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/970x600banner.jpg?v=1662357495\" alt=\"\" style=\"float: none;\" data-mce-fragment=\"1\" data-mce-style=\"float: none;\" data-mce-src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/970x600banner.jpg?v=1662357495\"\u003e\u003c\/div\u003e\n\u003cdiv style=\"text-align: left;\" data-mce-fragment=\"1\" data-mce-style=\"text-align: left;\"\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/banner2.jpg?v=1662100544\" style=\"float: none;\"\u003e\u003c\/div\u003e\n\u003cbr\u003e\u003cstrong\u003eItem Details\u003c\/strong\u003e\u003cbr\u003e1.made of medical grade of plastic and stainless steel.\u003cbr\u003e2.0.30mm needles with medium taper.Used for detail and soft coloring,blending works.\u003cbr\u003e3.sizes available by \u003cstrong\u003e1005RM,1007RM,1009RM,1011RM,1013RM,1015RM (0.30mm).\u003c\/strong\u003e\u003cbr\u003e4.sterilized by E.O. gas.\u003cbr\u003e5.box of 10pcs.\u003cbr\u003e6.the cushion enlarges the outer diameter of needle cartridge and make it more fit with the pen.\u003cbr\u003e7.cushion come with anti-skid groove desing,that features with shock absorption and reduce fatigue."}; 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-4647085604966 .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-4647085604966", { 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-4647085604966-' + 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-4647085604966 .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.quickshopOptionsMap4647085604966 = {}; Shopify.quickshopLinkOptionSelectors4647085604966(product); } } else { //single variant layout.find('form.product-form .product-options > select').remove(); var variant_field = ''; layout.find('form.product-form').append(variant_field); } });