Shopify.quickshopOptionsMap2038902259766 = {};
Shopify.quickshopUpdateOptionsInSelector2038902259766 = function(selectorIndex) {
switch (selectorIndex) {
case 0:
var key = 'root';
var selector = jQuery('#product-form-quick-2038902259766 .single-option-selector:eq(0)');
break;
case 1:
var key = jQuery('#product-form-quick-2038902259766 .single-option-selector:eq(0)').val();
var selector = jQuery('#product-form-quick-2038902259766 .single-option-selector:eq(1)');
break;
case 2:
var key = jQuery('#product-form-quick-2038902259766 .single-option-selector:eq(0)').val();
key += ' / ' + jQuery('#product-form-quick-2038902259766 .single-option-selector:eq(1)').val();
var selector = jQuery('#product-form-quick-2038902259766 .single-option-selector:eq(2)');
}
var initialValue = selector.val();
selector.empty();
var availableOptions = Shopify.quickshopOptionsMap2038902259766[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-2038902259766 .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.quickshopLinkOptionSelectors2038902259766 = 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.quickshopOptionsMap2038902259766['root'] = Shopify.quickshopOptionsMap2038902259766['root'] || [];
Shopify.quickshopOptionsMap2038902259766['root'].push(variant.option1);
Shopify.quickshopOptionsMap2038902259766['root'] = Shopify.uniq(Shopify.quickshopOptionsMap2038902259766['root']);
// Gathering values for the 2nd drop-down.
if (product.options.length > 1) {
var key = variant.option1;
Shopify.quickshopOptionsMap2038902259766[key] = Shopify.quickshopOptionsMap2038902259766[key] || [];
Shopify.quickshopOptionsMap2038902259766[key].push(variant.option2);
Shopify.quickshopOptionsMap2038902259766[key] = Shopify.uniq(Shopify.quickshopOptionsMap2038902259766[key]);
}
// Gathering values for the 3rd drop-down.
if (product.options.length === 3) {
var key = variant.option1 + ' / ' + variant.option2;
Shopify.quickshopOptionsMap2038902259766[key] = Shopify.quickshopOptionsMap2038902259766[key] || [];
Shopify.quickshopOptionsMap2038902259766[key].push(variant.option3);
Shopify.quickshopOptionsMap2038902259766[key] = Shopify.uniq(Shopify.quickshopOptionsMap2038902259766[key]);
}
//}
}
// Update options right away.
Shopify.quickshopUpdateOptionsInSelector2038902259766(0);
if (product.options.length > 1) Shopify.quickshopUpdateOptionsInSelector2038902259766(1);
if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2038902259766(2);
// When there is an update in the first dropdown.
jQuery("#product-form-quick-2038902259766 .single-option-selector:eq(0)").change(function() {
Shopify.quickshopUpdateOptionsInSelector2038902259766(1);
if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2038902259766(2);
return true;
});
// When there is an update in the second dropdown.
jQuery("#product-form-quick-2038902259766 .single-option-selector:eq(1)").change(function() {
if (product.options.length === 3) Shopify.quickshopUpdateOptionsInSelector2038902259766(2);
return true;
});
};
productsObj.id2038902259766 = {"id":2038902259766,"title":"2PCS Portable Power Supply Power 1500mAh","handle":"premium-mini-portable-power-supply-power-bank-output-2a-for-tattoo-pen-machine","description":"\u003cp\u003eSuper mini power bank features for it's vary voltages output,rechargeable for reuse.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eProduct Details\u003c\/strong\u003e\u003cbr\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eProduct Name: Pro Tattoo Power Bank Supply\u003c\/li\u003e\n\u003cli\u003eDimension:6.9cmX2.9cmX2.3cm\u003c\/li\u003e\n\u003cli\u003eNet weight:50grams.\u003c\/li\u003e\n\u003cli\u003eCapacitance:1500mAh\u003c\/li\u003e\n\u003cli\u003eOutput:4.5V,6V,7.5V,9V,10.5V(2A)\u003c\/li\u003e\n\u003cli\u003ePacking:1X power bank,1X USB cord\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cbr\u003e\u003cstrong\u003eAttentions\u003c\/strong\u003e\u003cbr\u003e\u003cbr\u003e1.this power bank packing NOT container the charging plug.you should work it with plug for smart phone or pc with the USB insert.\u003cbr\u003e2.keep this device away from liquid to avoid the short circuit.\u003cbr\u003e3.dont disassemble,puncture,crush,heat or burn.\u003cbr\u003e4.don't throw it away into the trash.\u003cbr\u003e5.keep it away from the reach of children.\u003c\/p\u003e\n\u003cp\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/Pro-Power-Bank_1_large.jpg?v=1553915468\" alt=\"\"\u003e\u003c\/p\u003e","published_at":"2019-03-30T11:05:56+08:00","created_at":"2019-03-30T11:11:33+08:00","vendor":"Discover Device","type":"Tattoo Battery","tags":[],"price":4900,"price_min":4900,"price_max":4900,"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":41838027473069,"title":"1166-RCA 2PCS","option1":"1166-RCA 2PCS","option2":null,"option3":null,"sku":"1166-RCA","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"2PCS Portable Power Supply Power 1500mAh - 1166-RCA 2PCS","public_title":"1166-RCA 2PCS","options":["1166-RCA 2PCS"],"price":4900,"weight":60,"compare_at_price":null,"inventory_management":"shopify","barcode":"738191666650","requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41838027505837,"title":"1166-DC 2PCS","option1":"1166-DC 2PCS","option2":null,"option3":null,"sku":"1166-RCA-2","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"2PCS Portable Power Supply Power 1500mAh - 1166-DC 2PCS","public_title":"1166-DC 2PCS","options":["1166-DC 2PCS"],"price":4900,"weight":60,"compare_at_price":null,"inventory_management":"shopify","barcode":"738191666667","requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/discoverdevice.com\/cdn\/shop\/products\/1166_Power_Bank_RCA-DC.jpg?v=1663915497","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_7.jpg?v=1663915497","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_1.jpg?v=1572347661","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_2.jpg?v=1572347660","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_3.jpg?v=1572347461","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_5.jpg?v=1572347463","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_6.jpg?v=1572347465","\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_8.jpg?v=1572347396"],"featured_image":"\/\/discoverdevice.com\/cdn\/shop\/products\/1166_Power_Bank_RCA-DC.jpg?v=1663915497","options":["Style"],"media":[{"alt":null,"id":1203703939126,"position":1,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/1166_Power_Bank_RCA-DC.jpg?v=1663915497"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/1166_Power_Bank_RCA-DC.jpg?v=1663915497","width":800},{"alt":null,"id":1203703906358,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_7.jpg?v=1663915497"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_7.jpg?v=1663915497","width":1000},{"alt":null,"id":1203704168502,"position":3,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_1.jpg?v=1572347661"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_1.jpg?v=1572347661","width":1000},{"alt":null,"id":1203704201270,"position":4,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_2.jpg?v=1572347660"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_2.jpg?v=1572347660","width":1000},{"alt":null,"id":1203704266806,"position":5,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_3.jpg?v=1572347461"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_3.jpg?v=1572347461","width":1000},{"alt":null,"id":1203704332342,"position":6,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_5.jpg?v=1572347463"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_5.jpg?v=1572347463","width":1000},{"alt":null,"id":1203704561718,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_6.jpg?v=1572347465"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_6.jpg?v=1572347465","width":1000},{"alt":null,"id":1203704594486,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_8.jpg?v=1572347396"},"aspect_ratio":1.0,"height":1000,"media_type":"image","src":"\/\/discoverdevice.com\/cdn\/shop\/products\/Pro-Power-Bank_8.jpg?v=1572347396","width":1000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003eSuper mini power bank features for it's vary voltages output,rechargeable for reuse.\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eProduct Details\u003c\/strong\u003e\u003cbr\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eProduct Name: Pro Tattoo Power Bank Supply\u003c\/li\u003e\n\u003cli\u003eDimension:6.9cmX2.9cmX2.3cm\u003c\/li\u003e\n\u003cli\u003eNet weight:50grams.\u003c\/li\u003e\n\u003cli\u003eCapacitance:1500mAh\u003c\/li\u003e\n\u003cli\u003eOutput:4.5V,6V,7.5V,9V,10.5V(2A)\u003c\/li\u003e\n\u003cli\u003ePacking:1X power bank,1X USB cord\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cbr\u003e\u003cstrong\u003eAttentions\u003c\/strong\u003e\u003cbr\u003e\u003cbr\u003e1.this power bank packing NOT container the charging plug.you should work it with plug for smart phone or pc with the USB insert.\u003cbr\u003e2.keep this device away from liquid to avoid the short circuit.\u003cbr\u003e3.dont disassemble,puncture,crush,heat or burn.\u003cbr\u003e4.don't throw it away into the trash.\u003cbr\u003e5.keep it away from the reach of children.\u003c\/p\u003e\n\u003cp\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0148\/5556\/9462\/files\/Pro-Power-Bank_1_large.jpg?v=1553915468\" alt=\"\"\u003e\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-2038902259766 .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-2038902259766", {
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-2038902259766-' + i + '-' + valueHandle;
if (optionValues.indexOf(value) < 0) {
options += '